diff --git a/apps/www/components/Footer/index.tsx b/apps/www/components/Footer/index.tsx index 2a51a62668f..9f75b76007b 100644 --- a/apps/www/components/Footer/index.tsx +++ b/apps/www/components/Footer/index.tsx @@ -4,6 +4,7 @@ import Link from 'next/link' import { useRouter } from 'next/router' import { Badge, IconDiscord, IconGitHubSolid, IconTwitterX, IconYoutubeSolid, cn } from 'ui' import SectionContainer from '../Layouts/SectionContainer' +import { useEffect, useState } from 'react' import * as supabaseLogoWordmarkDark from 'common/assets/images/supabase-logo-wordmark--dark.png' import * as supabaseLogoWordmarkLight from 'common/assets/images/supabase-logo-wordmark--light.png' @@ -19,6 +20,14 @@ interface Props { const Footer = (props: Props) => { const { pathname } = useRouter() + const [year, setYear] = useState(new Date().getFullYear()) + + useEffect(() => { + fetch('https://getfullyear.com/api/year') + .then((response) => response.json()) + .then((data) => setYear(data.year)) + }, []) + const isDarkLaunchWeek = useDarkLaunchWeeks() const isGAWeek = pathname.includes('/ga-week') const forceDark = isDarkLaunchWeek @@ -164,6 +173,7 @@ const Footer = (props: Props) => {
© Supabase Inc + {year}