Skip to content

Commit

Permalink
Fix crash gallery on deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
jakzaizzat committed May 3, 2024
1 parent 5c02f3b commit 7708d7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function GalleryPreviewCard({ galleryRef, isFeatured, queryRef }: Gallery

const navigation = useNavigation<MainTabStackNavigatorProp>();
const handlePress = useCallback(() => {
navigation.push('Gallery', { galleryId: gallery.dbid });
navigation.push('Gallery', { galleryId: gallery?.dbid });
}, [gallery.dbid, navigation]);

const handleOptionPress = useCallback(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function GalleryPreviewCardBottomSheet({ galleryRef, onClose }: Props) {
galleryRef
);

const galleryId = gallery.dbid;
const galleryId = gallery?.dbid;

const { bottom } = useSafeAreaPadding();
const { pushToast } = useToastActions();
Expand Down

0 comments on commit 7708d7b

Please sign in to comment.