Skip to content

Commit

Permalink
fix(frontend): display correct summary
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnisDa committed Jan 8, 2025
1 parent c719e9b commit b8d1770
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions apps/frontend/app/routes/_dashboard._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ import { MetadataDisplayItem } from "~/components/media";
import {
MediaColors,
dayjsLib,
getLot,
getMetadataIcon,
openConfirmationModal,
} from "~/lib/generals";
Expand Down Expand Up @@ -642,13 +641,13 @@ const DisplayStatForMediaType = (props: {
}>;
}) => {
const userPreferences = useUserPreferences();
const isEnabled = Object.entries(
userPreferences.featuresEnabled.media || {},
).find(([name, _]) => getLot(name) === props.lot);
const isEnabled = userPreferences.featuresEnabled.media.specific.includes(
props.lot,
);
const Icon = getMetadataIcon(props.lot);
const icon = <Icon size={24} stroke={1.5} />;

return isEnabled?.[1] && userPreferences.featuresEnabled.media.enabled ? (
return isEnabled && userPreferences.featuresEnabled.media.enabled ? (
<UnstyledLink
to={$path("/media/:action/:lot", {
action: "list",
Expand Down

0 comments on commit b8d1770

Please sign in to comment.