Add default message prop to StarredEntities

Signed-off-by: Esther Annorzie <eannorzie@indeed.com>
This commit is contained in:
Esther Annorzie
2022-11-21 15:45:43 -05:00
parent 18d17412cf
commit 614083ef98
@@ -41,7 +41,14 @@ import useAsync from 'react-use/lib/useAsync';
*
* @public
*/
export const Content = () => {
interface starredEntitiesProp {
defaultMessage?: string;
}
export const Content = ({
defaultMessage = 'Click the star beside an entity name to add the entity to this list!',
}: starredEntitiesProp) => {
const catalogApi = useApi(catalogApiRef);
const catalogEntityRoute = useRouteRef(entityRouteRef);
const { starredEntities, toggleStarredEntity } = useStarredEntities();
@@ -76,7 +83,8 @@ export const Content = () => {
if (starredEntities.size === 0)
return (
<Typography variant="body1">
You do not have any starred entities yet!
{/* You do not have any starred entities yet! */}
{defaultMessage}
</Typography>
);