feat: preload fonts, remove GA
This commit is contained in:
parent
da5ed786e3
commit
9815117da5
@ -21,6 +21,12 @@ export type MetaProps = BasicMeta & { rawNextSeoProps?: NextSeoProps }
|
||||
export const Meta = (props: MetaProps) => {
|
||||
const router = useRouter()
|
||||
|
||||
const preloadFonts = [
|
||||
{ href: '/fonts/arthemys/ArthemysDisplay-Regular.woff2', as: 'font' },
|
||||
{ href: '/fonts/tt-hoves/TTHoves-Regular.woff2', as: 'font' },
|
||||
{ href: '/fonts/dm-mono/DMMono-Regular.woff2', as: 'font' }
|
||||
]
|
||||
|
||||
const nextSeoProps: NextSeoProps = React.useMemo(() => {
|
||||
return {
|
||||
title: props.title ?? defaultMeta.title,
|
||||
@ -78,6 +84,9 @@ export const Meta = (props: MetaProps) => {
|
||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#000000" />
|
||||
<meta name="msapplication-TileColor" content="#000000" />
|
||||
<meta name="theme-color" content="#ffffff" />
|
||||
{preloadFonts?.map(({ href, as }) => (
|
||||
<link key={href} rel="preload" href={href} as={as} />
|
||||
))}
|
||||
{props.preload?.map(({ href, as }) => (
|
||||
<link key={href} rel="preload" href={href} as={as} />
|
||||
))}
|
||||
@ -88,7 +97,7 @@ export const Meta = (props: MetaProps) => {
|
||||
|
||||
<style jsx global>{`
|
||||
html {
|
||||
color-scheme: ${props.colorScheme ?? 'light'};
|
||||
color-scheme: ${props.colorScheme ?? 'dark'};
|
||||
}
|
||||
`}</style>
|
||||
</>
|
||||
|
||||
@ -26,7 +26,7 @@ export const basementLog = `
|
||||
|
||||
export const defaultMeta = {
|
||||
title: 'Laconic Network',
|
||||
description: ``,
|
||||
description: 'Laconic Network Description',
|
||||
ogImage: `${siteOrigin}/og.jpeg`,
|
||||
twitter: {
|
||||
handle: '@laconicnetwork',
|
||||
|
||||
@ -8,7 +8,7 @@ import * as React from 'react'
|
||||
import { AnimationContextProvider } from '~/context/animation'
|
||||
import { basementLog, isProd } from '~/lib/constants'
|
||||
import { FontsReadyScript } from '~/lib/font-scripts'
|
||||
import { GAScripts, useAppGA } from '~/lib/ga'
|
||||
// import { GAScripts, useAppGA } from '~/lib/ga'
|
||||
import { PageTransitionsProvider } from '~/lib/gsap/page-transitions'
|
||||
|
||||
export type Page<P = Record<string, unknown>> = NextComponentType<
|
||||
@ -27,7 +27,7 @@ if (isProd) {
|
||||
}
|
||||
|
||||
const App = ({ Component, pageProps, ...rest }: AppProps) => {
|
||||
useAppGA()
|
||||
// useAppGA()
|
||||
|
||||
React.useEffect(() => {
|
||||
function handleKeyDown(event: KeyboardEvent) {
|
||||
@ -56,7 +56,7 @@ const App = ({ Component, pageProps, ...rest }: AppProps) => {
|
||||
<RealViewportProvider debounceResize={false}>
|
||||
<AnimationContextProvider>
|
||||
<PageTransitionsProvider>
|
||||
<GAScripts />
|
||||
{/* <GAScripts /> */}
|
||||
<FontsReadyScript />
|
||||
{getLayout({ Component, pageProps, ...rest })}
|
||||
</PageTransitionsProvider>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user