diff --git a/src/components/features/assets/AssetCardDialog/AssetCardDialog.tsx b/src/components/features/assets/AssetCardDialog/AssetCardDialog.tsx index ad0e36ea..e32ab487 100644 --- a/src/components/features/assets/AssetCardDialog/AssetCardDialog.tsx +++ b/src/components/features/assets/AssetCardDialog/AssetCardDialog.tsx @@ -23,17 +23,23 @@ export interface AssetCardDialogProps { handleClose: () => void; handleAssetSelection: (asset: Omit) => void; actionIsHide?: boolean; + campaignId?: string; } export function AssetCardDialog(props: AssetCardDialogProps) { - const { open, loading, handleClose, handleAssetSelection, actionIsHide = false } = props; + const { open, loading, handleClose, handleAssetSelection, actionIsHide = false, campaignId } = props; const assetGroups = useStore( (store) => store.rules.assetMaps.assetCollectionMap ); - const hiddenAssets = useStore( + let hiddenAssets = useStore( (store) => store.campaigns.currentCampaign.currentCampaign?.hiddenAssetIds - ) + ); + const campaigns = useStore((store) => store.campaigns.campaignMap); + + if (!hiddenAssets && campaignId && Object.keys(campaigns).includes(campaignId)) { + hiddenAssets = campaigns[campaignId].hiddenAssetIds; + } const [selectedTabId, setSelectedTabId] = useState( Object.keys(assetGroups)[0] diff --git a/src/pages/Character/CharacterCreatePage/CharacterCreatePageContent.tsx b/src/pages/Character/CharacterCreatePage/CharacterCreatePageContent.tsx index 76c373eb..610e09c4 100644 --- a/src/pages/Character/CharacterCreatePage/CharacterCreatePageContent.tsx +++ b/src/pages/Character/CharacterCreatePage/CharacterCreatePageContent.tsx @@ -107,7 +107,7 @@ export function CharacterCreatePageContent() { {!campaignId && } - +