🕶Added visibility guards to volumes, stats and wanted on dashboard

This commit is contained in:
2026-03-09 23:11:15 -04:00
parent ba1b5bb965
commit 4e2cad790b
3 changed files with 7 additions and 3 deletions

View File

@@ -11,9 +11,11 @@ type VolumeGroupsProps = {
volumeGroups?: GetVolumeGroupsQuery['getComicBookGroups'];
};
export const VolumeGroups = (props: VolumeGroupsProps): ReactElement => {
export const VolumeGroups = (props: VolumeGroupsProps): ReactElement | null => {
// Till mongo gives us back the deduplicated results with the ObjectId
const deduplicatedGroups = unionBy(props.volumeGroups, "volumes.id");
if (!deduplicatedGroups || deduplicatedGroups.length === 0) return null;
const navigate = useNavigate();
const navigateToVolumes = (row: any) => {
navigate(`/volumes/all`);