|
|
|
@ -94,9 +94,14 @@ const useHasHydrated = () => {
|
|
|
|
|
|
|
|
|
|
const loadAsyncGoogleFont = () => {
|
|
|
|
|
const linkEl = document.createElement("link");
|
|
|
|
|
const proxyFontUrl = "/google-fonts";
|
|
|
|
|
const remoteFontUrl = "https://fonts.googleapis.com";
|
|
|
|
|
const googleFontUrl =
|
|
|
|
|
getClientConfig()?.buildMode === "export" ? remoteFontUrl : proxyFontUrl;
|
|
|
|
|
linkEl.rel = "stylesheet";
|
|
|
|
|
linkEl.href =
|
|
|
|
|
"/google-fonts/css2?family=Noto+Sans+SC:wght@300;400;700;900&display=swap";
|
|
|
|
|
googleFontUrl +
|
|
|
|
|
"/css2?family=Noto+Sans+SC:wght@300;400;700;900&display=swap";
|
|
|
|
|
document.head.appendChild(linkEl);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|