Skip to content

Commit

Permalink
refactor(SLB-222): font preloadedingˆ
Browse files Browse the repository at this point in the history
  • Loading branch information
pmelab committed Apr 19, 2024
1 parent 5afd802 commit 7986988
Show file tree
Hide file tree
Showing 4 changed files with 371 additions and 245 deletions.
4 changes: 2 additions & 2 deletions apps/website/gatsby-ssr.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Locale } from '@custom/schema';
import { fonts } from '@custom/ui/fonts';
import { fonts } from '@custom/ui/preloaded-fonts';
import { GatsbySSR } from 'gatsby';
import React from 'react';

Expand Down Expand Up @@ -34,7 +34,7 @@ export const onRenderBody: GatsbySSR['onRenderBody'] = ({
as="font"
type="font/woff2"
crossOrigin="anonymous"
key="NotoSansGurmukhi"
key={font}
/>,
]);
});
Expand Down
9 changes: 5 additions & 4 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
"./styles.css": [
"./build/styles.css"
],
"./fonts": [
"./fonts.js"
"./preloaded-fonts": [
"./build/preloaded-fonts.js"
]
},
"typesVersions": {
"*": {
"routes/*": [
"build/components/Routes/*.d.ts"
],
"fonts": [
"fonts.d.ts"
"preloaded-fonts": [
"build/preloaded-fonts.d.ts"
]
}
},
Expand Down Expand Up @@ -89,6 +89,7 @@
"@types/react": "^18.2.46",
"@types/react-body-classname": "^1.1.10",
"@types/react-dom": "^18.2.18",
"@types/node": "~18.15.3",
"@vitejs/plugin-react-swc": "^3.5.0",
"autoprefixer": "^10.4.16",
"cssnano": "^6.0.3",
Expand Down
File renamed without changes.
Loading

0 comments on commit 7986988

Please sign in to comment.