Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Fix/announcement bar flashing (#4046)

Jonathan Summers-Muir41e2e085cd97
diff --git a/www/components/Nav/Announcement.tsx b/www/components/Nav/Announcement.tsx
index a4069846c4f..468a8652b18 100644
--- a/www/components/Nav/Announcement.tsx
+++ b/www/components/Nav/Announcement.tsx
@@ -5,7 +5,7 @@ import { IconChevronRight, IconX } from '@supabase/ui'
import { useRouter } from 'next/router'
const Announcement = () => {
- const [hidden, setHidden] = useState(false)
+ const [hidden, setHidden] = useState(true)
const router = useRouter()
@@ -18,8 +18,8 @@ const Announcement = () => {
// window.localStorage is kept inside useEffect
// to prevent error
useEffect(function () {
- if (window.localStorage.getItem(announcementKey)) {
- return setHidden(true)
+ if (!window.localStorage.getItem(announcementKey)) {
+ return setHidden(false)
}
}, [])
diff --git a/www/data/Announcement.json b/www/data/Announcement.json
index 887bccda46b..07a97afcd24 100644
--- a/www/data/Announcement.json
+++ b/www/data/Announcement.json
@@ -2,5 +2,5 @@
"show": true,
"text": "Supabase Launch Week III starting 29th November",
"cta": "Latest Launch Week news",
- "link": "/blog/2021/11/05/supabase-beta-october-2021#coming-next-launch-week-iii"
+ "link": "/blog/2021/11/05/supabase-beta-october-2021"
}