Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
RoninDojo
Ronin-Website
Commits
29919976
Unverified
Commit
29919976
authored
Jan 23, 2021
by
Pavel Ševčík
Browse files
Move Layout to _app.tsx
parent
e24e1134
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
src/pages/_app.tsx
src/pages/_app.tsx
+4
-2
src/pages/_document.tsx
src/pages/_document.tsx
+1
-4
No files found.
src/pages/_app.tsx
View file @
29919976
import
React
from
"
react
"
;
import
Head
from
"
next/head
"
;
import
{
Layout
}
from
"
../components/Layout
"
;
import
"
../css/materialize.css
"
;
import
"
../css/defaults.css
"
;
import
"
../css/style.css
"
;
...
...
@@ -10,7 +12,7 @@ const description =
const
MyApp
=
({
Component
,
pageProps
})
=>
{
return
(
<>
<
Layout
>
<
Head
>
<
meta
charSet
=
"UTF-8"
/>
<
meta
name
=
"viewport"
content
=
"width=device-width, initial-scale=1"
/>
...
...
@@ -46,7 +48,7 @@ const MyApp = ({ Component, pageProps }) => {
<
link
rel
=
"manifest"
href
=
"/assets/site.webmanifest"
/>
</
Head
>
<
Component
{
...
pageProps
}
/>
</>
</
Layout
>
);
};
...
...
src/pages/_document.tsx
View file @
29919976
import
React
from
"
react
"
;
import
Document
,
{
Html
,
Head
,
Main
,
NextScript
}
from
"
next/document
"
;
import
{
Layout
}
from
"
../components/Layout
"
;
class
MyDocument
extends
Document
{
static
async
getInitialProps
(
ctx
)
{
...
...
@@ -13,9 +12,7 @@ class MyDocument extends Document {
<
Html
lang
=
"en"
>
<
Head
/>
<
body
>
<
Layout
>
<
Main
/>
</
Layout
>
<
Main
/>
<
NextScript
/>
</
body
>
</
Html
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment