Rename prop in starredEntitiesProp and remove comment

Signed-off-by: Esther Annorzie <eannorzie@indeed.com>
This commit is contained in:
Esther Annorzie
2022-11-22 10:09:55 -05:00
parent 614083ef98
commit 9239c8acb8
@@ -43,12 +43,10 @@ import useAsync from 'react-use/lib/useAsync';
*/
interface starredEntitiesProp {
defaultMessage?: string;
noStarredEntitiesMessage?: React.ReactNode;
}
export const Content = ({
defaultMessage = 'Click the star beside an entity name to add the entity to this list!',
}: starredEntitiesProp) => {
export const Content = ({ noStarredEntitiesMessage }: starredEntitiesProp) => {
const catalogApi = useApi(catalogApiRef);
const catalogEntityRoute = useRouteRef(entityRouteRef);
const { starredEntities, toggleStarredEntity } = useStarredEntities();
@@ -83,8 +81,8 @@ export const Content = ({
if (starredEntities.size === 0)
return (
<Typography variant="body1">
{/* You do not have any starred entities yet! */}
{defaultMessage}
{noStarredEntitiesMessage ||
'Click the star beside an entity name to add it to this list!'}
</Typography>
);