Skip to content

Commit

Permalink
fix: edit roboto resource link to be non blocking
Browse files Browse the repository at this point in the history
* fix: avoid local font to be requested at every re-render
Introduced with caff759

refs: IRIS-3540  (#169)
  • Loading branch information
beawar authored Dec 6, 2022
1 parent 2d4fd63 commit 98622a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/boot/theme-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export const ThemeProvider: FC = ({ children }) => {
}, [localStorageSettings]);

return (
<UIThemeProvider extension={aggregatedExtensions} loadDefaultFont>
<UIThemeProvider extension={aggregatedExtensions}>
<ThemeCallbacksContext.Provider value={{ addExtension, setDarkReaderState }}>
<GlobalStyle baseFontSize={baseFontSize} />
{children}
Expand Down
7 changes: 6 additions & 1 deletion src/index.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto">
<!-- connect to domain of font files -->
<link rel="preconnect" href="https://fonts.googleapis.com" crossorigin>
<!-- optionally increase loading priority -->
<link rel="preload" as="style" href="https://fonts.googleapis.com/css?family=Roboto">
<!-- async CSS -->
<link rel="stylesheet" media="print" onload="this.onload=null;this.removeAttribute('media');" href="https://fonts.googleapis.com/css?family=Roboto">
</head>

<body>
Expand Down

0 comments on commit 98622a8

Please sign in to comment.