Skip to content

Commit

Permalink
fix announcement and seen state typo
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitoo1 committed May 3, 2024
1 parent decf548 commit b94e5ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/mobile/src/contexts/SanityAnnouncementContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ export const SanityAnnouncementProvider = ({ children }: { children: ReactNode[]
// Function to dismiss an announcement
const dismissAnnouncement = useCallback(async () => {
if (announcement && announcement.internal_id) {
await AsyncStorage.setItem(`hasDismissedAnnouncement-${announcement.internal_id}`, 'true');
await AsyncStorage.setItem(`${announcement.internal_id}-hasDismissedAnnouncement`, 'true');
setHasDismissedAnnouncement(true);
}
}, [announcement]);

const markAnnouncementAsSeen = useCallback(async () => {
if (announcement && announcement.internal_id) {
await AsyncStorage.setItem(`hasSeenAnnouncement-${announcement.internal_id}`, 'true');
await AsyncStorage.setItem(`${announcement.internal_id}-hasSeenAnnouncement`, 'true');
setHasSeenAnnouncement(true);
}
}, [announcement]);
Expand Down

0 comments on commit b94e5ed

Please sign in to comment.