From 68138f0dcd8b3db2c23b31a20508726f245b5ba5 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 17 Jan 2022 17:13:51 +0100 Subject: feat: implement dark mode --- src/pages/_app.tsx | 9 ++++++++- src/pages/index.tsx | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'src/pages') diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index fde93eb..a22c616 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -5,6 +5,7 @@ import { I18nProvider } from '@lingui/react'; import { AppPropsWithLayout } from '@ts/types/app'; import { initTranslation } from '@utils/helpers/i18n'; import '../styles/globals.scss'; +import { ThemeProvider } from 'next-themes'; initTranslation(i18n); @@ -29,7 +30,13 @@ function MyApp({ Component, pageProps }: AppPropsWithLayout) { const getLayout = Component.getLayout ?? ((page) => page); return ( - {getLayout()} + + {getLayout()} + ); } diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 99d506d..3664ae1 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -9,8 +9,8 @@ import HomePageContent from '@content/pages/homepage.mdx'; import { ButtonLink } from '@components/Buttons'; import styles from '@styles/pages/Home.module.scss'; import { t } from '@lingui/macro'; -import ContactIcon from '@assets/images/icon-contact.svg'; import FeedIcon from '@assets/images/icon-feed.svg'; +import { ContactIcon } from '@components/Icons'; const Home: NextPageWithLayout = () => { const CodingLinks = () => { @@ -69,13 +69,13 @@ const Home: NextPageWithLayout = () => {