From 3b7872ab84af09b1292faefaba40cbaeaac42ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateus=20Felipe=20Gon=C3=A7alves?= Date: Fri, 16 Dec 2022 16:45:18 -0300 Subject: [PATCH] feat(seo): add global meta tags on `_app.tsx` --- src/pages/_app.tsx | 57 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 48 insertions(+), 9 deletions(-) diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index e086f915..ca2f2284 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -1,22 +1,61 @@ import React from 'react' import Head from 'next/head' import { AppProps } from 'next/app' -import { ThemeProvider } from 'next-themes' +import { ThemeProvider, useTheme } from 'next-themes' import '../styles/main.css' const MyApp: React.FC = ({ Component, pageProps }) => { + const { theme } = useTheme() + return ( <> - -