Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Commit

Permalink
🎨 ✨ use @next/font
Browse files Browse the repository at this point in the history
use @next/font

**Intentions:**

- 🎨 - Improve format/structure
- ✨ - New feature
  • Loading branch information
TimMikeladze committed Jan 23, 2023
1 parent 814eaed commit 3b7c611
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
6 changes: 6 additions & 0 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useApollo } from '@/graphql/apollo';
import { ApolloProvider } from '@apollo/client';
import AppPage from '@/components/AppPage';
import { DefaultSeo } from 'next-seo';
import { appFont } from '@/theme';

const MyApp = ({
Component,
Expand All @@ -22,6 +23,11 @@ const MyApp = ({

return (
<>
<style jsx global>{`
* {
font-family: ${appFont.style.fontFamily}, sans-serif !important;
}
`}</style>
<DefaultSeo title={t(`seoTitle`)} description={t(`seoDescription`)} />
<ApolloProvider client={apollo}>
<SessionProvider session={session}>
Expand Down
8 changes: 1 addition & 7 deletions src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@ export default class MyDocument extends Document {
render() {
return (
<Html>
<Head>
<link rel="preconnect" href="https://fonts.bunny.net" />
<link
href="https://fonts.bunny.net/css?family=inter:100,200,300,400,500,600,700,800,900"
rel="stylesheet"
/>
</Head>
<Head />
<body>
{getInitColorSchemeScript()}
<Main />
Expand Down
1 change: 0 additions & 1 deletion src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ body {

* {
box-sizing: border-box;
font-family: 'Inter', sans-serif !important;
}

a {
Expand Down
7 changes: 7 additions & 0 deletions src/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import { extendTheme } from '@mui/joy';

import { Inter } from '@next/font/google';

export const appFont = Inter({
// eslint-disable-next-line @typescript-eslint/quotes
subsets: ['latin'],
});

export const appTheme = extendTheme({});

1 comment on commit 3b7c611

@vercel
Copy link

@vercel vercel bot commented on 3b7c611 Jan 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.