1- import { NextSeo , NextSeoProps } from 'next-seo' ;
2- import Link from 'next/link' ;
3- import { AnalyticsWrapper } from './components/Analytics' ;
4- import { Footer } from './components/Footer' ;
5- import { Overpass , Open_Sans } from '@next/font/google' ;
1+ import { NextSeo , NextSeoProps } from 'next-seo'
2+ import Link from 'next/link'
3+ import { AnalyticsWrapper } from './components/Analytics'
4+ import { Footer } from './components/Footer'
5+ import { Overpass , Open_Sans } from '@next/font/google'
66
7- import '../styles/globals.css' ;
8- import { Nav } from './components/Nav' ;
9- import Script from 'next/script' ;
10- import { env } from '../env/server.mjs' ;
7+ import '../styles/globals.css'
8+ import { Nav } from './components/Nav'
9+ import Script from 'next/script'
10+ import { env } from '../env/server.mjs'
1111// If loading a variable font, you don't need to specify the font weight
1212const overpass = Overpass ( {
1313 //weight: ['600', '900'],
@@ -16,7 +16,7 @@ const overpass = Overpass({
1616 variable : '--font-overpass' ,
1717 // default, can also use "swap" to ensure custom font always shows
1818 display : 'swap' ,
19- } ) ;
19+ } )
2020
2121const open_sans = Open_Sans ( {
2222 //weight: ['400', '600'],
@@ -25,9 +25,9 @@ const open_sans = Open_Sans({
2525 variable : '--font-open-sans' ,
2626 // default, can also use "swap" to ensure custom font always shows
2727 display : 'swap' ,
28- } ) ;
28+ } )
2929
30- export const ogURL = `${ env . OG_URL } /api/og/jote` ;
30+ export const ogURL = `${ env . OG_URL } /api/og/jote`
3131
3232// next-seo.config.js
3333export const SEO = (
@@ -43,7 +43,7 @@ export const SEO = (
4343 locale = 'en_US' ,
4444 alt = '' ,
4545 } = { } ,
46- otherProps ?: NextSeoProps
46+ otherProps ?: NextSeoProps ,
4747) => (
4848 < NextSeo
4949 { ...{
@@ -60,13 +60,9 @@ export const SEO = (
6060 {
6161 url :
6262 image ||
63- `${ ogURL } ?title=${ encodeURIComponent (
64- ogTitle || title
65- ) } &author=${ encodeURIComponent (
66- description ?? '%20'
67- ) } &name=${ encodeURIComponent (
68- ! canonical ? '' : 'Center of Trial and Error'
69- ) } `,
63+ `${ ogURL } ?title=${ encodeURIComponent ( ogTitle || title ) } &author=${ encodeURIComponent (
64+ description ?? '%20' ,
65+ ) } &name=${ encodeURIComponent ( ! canonical ? '' : 'Center of Trial and Error' ) } `,
7066 width : 1200 ,
7167 height : 630 ,
7268 alt,
@@ -83,45 +79,25 @@ export const SEO = (
8379 ...otherProps ,
8480 } }
8581 />
86- ) ;
82+ )
8783
88- export default function RootLayout ( {
89- children,
90- } : {
91- children : React . ReactNode ;
92- } ) {
84+ export default function RootLayout ( { children } : { children : React . ReactNode } ) {
9385 return (
9486 < html lang = "en" className = { `${ open_sans . variable } ${ overpass . variable } ` } >
9587 < head >
9688 < meta charSet = "UTF-8" />
9789 < meta name = "viewport" content = "width=device-width, initial-scale=1.0" />
98- < link
99- rel = "apple-touch-icon"
100- sizes = "180x180"
101- href = "/apple-touch-icon.png"
102- />
103- < link
104- rel = "icon"
105- type = "image/png"
106- sizes = "32x32"
107- href = "/favicon-32x32.png"
108- />
109- < link
110- rel = "icon"
111- type = "image/png"
112- sizes = "16x16"
113- href = "/favicon-16x16.png"
114- />
90+ < link rel = "apple-touch-icon" sizes = "180x180" href = "/apple-touch-icon.png" />
91+ < link rel = "icon" type = "image/png" sizes = "32x32" href = "/favicon-32x32.png" />
92+ < link rel = "icon" type = "image/png" sizes = "16x16" href = "/favicon-16x16.png" />
11593 < link rel = "manifest" href = "/site.webmanifest" />
11694 < link rel = "mask-icon" href = "/safari-pinned-tab.svg" color = "#002642" />
11795 < meta name = "msapplication-TileColor" content = "#002642" />
11896 < meta name = "theme-color" content = "#ffffff" />
11997 </ head >
12098 < body >
121- { /* @ts -expect-error TODO: fix once Typescript is able to deal with async components or Next's typescript plugin is less ass */ }
12299 < Nav />
123100 { children }
124- { /* @ts -expect-error TODO: fix once Typescript is able to deal with async components or Next's typescript plugin is less ass */ }
125101 < Footer />
126102 < AnalyticsWrapper />
127103 < Script
@@ -132,5 +108,5 @@ export default function RootLayout({
132108 />
133109 </ body >
134110 </ html >
135- ) ;
111+ )
136112}
0 commit comments