Skip to content

Commit

Permalink
refactor: meta tag 위치 변경
Browse files Browse the repository at this point in the history
Warning: viewport meta tags should not be used in _document.js's <Head>. https://nextjs.org/docs/messages/no-document-viewport-meta
위 경고에 따라 _document.tsx에 있던 meta 태그를 _app.tsx 로 옮김
  • Loading branch information
ppark2ya committed Feb 12, 2022
1 parent 82c14d2 commit 34c2857
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 7 additions & 0 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { AppProps } from 'next/app';
import Head from 'next/head';
import { Hydrate, QueryClient, QueryClientProvider } from 'react-query';
import { ReactQueryDevtools } from 'react-query/devtools';
import { APP_STAGE } from '~/shared/constants/environments';
Expand Down Expand Up @@ -37,6 +38,12 @@ function MyApp({ Component, pageProps }: AppProps) {
return (
<>
<DefaultSeo />
<Head>
<meta
name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,shrink-to-fit=no"
/>
</Head>
<QueryClientProvider client={queryClient}>
<Hydrate state={pageProps.dehydratedState}>
<Box css={{ height: '100%' }}>
Expand Down
4 changes: 0 additions & 4 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ export default class MyDocument extends Document {
return (
<Html>
<Head>
<meta
name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,shrink-to-fit=no"
/>
<style
id={'stitches'}
dangerouslySetInnerHTML={{ __html: getCssText() }}
Expand Down

0 comments on commit 34c2857

Please sign in to comment.