Skip to content

Commit 6ba9c1c

Browse files
committed
Use font DM Sans
1 parent 390ea44 commit 6ba9c1c

File tree

4 files changed

+10
-24
lines changed

4 files changed

+10
-24
lines changed

package-lock.json

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"@ckeditor/ckeditor5-react": "^9.3.1",
2525
"@emotion/react": "^11.13.5",
2626
"@emotion/styled": "^11.13.5",
27+
"@fontsource/dm-sans": "^5.1.0",
2728
"@hookform/resolvers": "^3.9.1",
2829
"@prisma/client": "^5.22.0",
2930
"@stripe/stripe-js": "^5.2.0",

src/layout/theme.tsx

+2-22
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,6 @@
11
import { extendTheme } from "@chakra-ui/react";
22
import { mode } from "@chakra-ui/theme-tools";
3-
import { Global } from "@emotion/react";
4-
import React from "react";
5-
6-
export const Fonts = () => (
7-
<Global
8-
styles={`
9-
@font-face {
10-
font-family: Roboto;
11-
src: url(/fonts/Roboto-Light.ttf);
12-
}
13-
@font-face {
14-
font-family: Roboto;
15-
src: url(/fonts/Roboto-Bold.ttf);
16-
font-weight: bold;
17-
}
18-
`}
19-
/>
20-
);
3+
import "@fontsource/dm-sans";
214

225
export const Theme = extendTheme({
236
config: {
@@ -49,7 +32,7 @@ export const Theme = extendTheme({
4932
margin: "0px",
5033
backgroundRepeat: "no-repeat",
5134
backgroundAttachment: "fixed",
52-
fontFamily: "Roboto",
35+
fontFamily: "DM Sans",
5336
fontSize: "15px",
5437
bg: mode(
5538
"linear-gradient(to right top,#2a1036,#361149,#43105d,#4f0f71,#5b0b87)",
@@ -58,7 +41,4 @@ export const Theme = extendTheme({
5841
},
5942
}),
6043
},
61-
fonts: {
62-
body: "Roboto, sans-serif",
63-
},
6444
});

src/pages/_app.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Layout from "../layout";
22
import { ChakraProvider } from "@chakra-ui/react";
3-
import { Theme, Fonts } from "../layout/theme";
3+
import { Theme } from "../layout/theme";
44
import React from "react";
55
import { trpc } from "../utils/trpc";
66

@@ -13,7 +13,6 @@ BigInt.prototype.toJSON = function () {
1313
const MyApp = ({ Component, pageProps }: any) => {
1414
return (
1515
<ChakraProvider theme={Theme}>
16-
<Fonts />
1716
<Layout>
1817
<Component {...pageProps} />
1918
</Layout>

0 commit comments

Comments
 (0)