diff --git a/apps/www/components/Hero/Hero.tsx b/apps/www/components/Hero/Hero.tsx index 16a3448661a..8f9d8a6d1ca 100644 --- a/apps/www/components/Hero/Hero.tsx +++ b/apps/www/components/Hero/Hero.tsx @@ -24,7 +24,7 @@ const Hero = () => {
- +

diff --git a/apps/www/pages/ga-week/index.tsx b/apps/www/pages/ga-week/index.tsx index 76f899f804f..706f20c4fec 100644 --- a/apps/www/pages/ga-week/index.tsx +++ b/apps/www/pages/ga-week/index.tsx @@ -65,14 +65,19 @@ export default function GAWeekIndex({ meetups }: Props) { } }, [supabase]) + const isDark = resolvedTheme?.includes('dark') const isDarkTheme = resolvedTheme === 'dark' useEffect(() => { - if (isDarkTheme) { - setTheme('deep-dark') - } + isDarkTheme && setTheme('deep-dark') }, [isDarkTheme]) + useEffect(() => { + return () => { + isDark && setTheme('dark') + } + }, []) + useEffect(() => { if (session?.user) { if (userData?.id) { diff --git a/apps/www/pages/ga-week/tickets/[username].tsx b/apps/www/pages/ga-week/tickets/[username].tsx index 885f2ff229e..1e46d014e98 100644 --- a/apps/www/pages/ga-week/tickets/[username].tsx +++ b/apps/www/pages/ga-week/tickets/[username].tsx @@ -43,14 +43,19 @@ export default function UsernamePage({ user, ogImageUrl }: Props) { const [ticketState, setTicketState] = useState('ticket') const { resolvedTheme, setTheme } = useTheme() + const isDark = resolvedTheme?.includes('dark') const isDarkTheme = resolvedTheme === 'dark' useEffect(() => { - if (isDarkTheme) { - setTheme('deep-dark') - } + isDarkTheme && setTheme('deep-dark') }, [isDarkTheme]) + useEffect(() => { + return () => { + isDark && setTheme('dark') + } + }, []) + if (!ticketNumber) { return } diff --git a/apps/www/pages/ga.tsx b/apps/www/pages/ga.tsx index 9694737a166..48d367ff2eb 100644 --- a/apps/www/pages/ga.tsx +++ b/apps/www/pages/ga.tsx @@ -30,11 +30,15 @@ export default function IndexPage() { const isDarkTheme = resolvedTheme === 'dark' useEffect(() => { - if (isDarkTheme) { - setTheme('deep-dark') - } + isDarkTheme && setTheme('deep-dark') }, [isDarkTheme]) + useEffect(() => { + return () => { + isDark && setTheme('dark') + } + }, []) + return ( { )} >
-

+

General Availability Week

- Day 1 + Day 2