Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#2873 from Yidadaa/bugfix-0919
Browse files Browse the repository at this point in the history
  • Loading branch information
Yidadaa authored Sep 19, 2023
2 parents 175b4e7 + eae7d62 commit 588e907
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions app/components/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ const loadAsyncGoogleFont = () => {
getClientConfig()?.buildMode === "export" ? remoteFontUrl : proxyFontUrl;
linkEl.rel = "stylesheet";
linkEl.href =
googleFontUrl + "/css2?family=" + encodeURIComponent("Noto Sans:wght@300;400;700;900") + "&display=swap";
googleFontUrl +
"/css2?family=" +
encodeURIComponent("Noto Sans:wght@300;400;700;900") +
"&display=swap";
document.head.appendChild(linkEl);
};

Expand All @@ -125,6 +128,8 @@ function Screen() {
const isHome = location.pathname === Path.Home;
const isAuth = location.pathname === Path.Auth;
const isMobileScreen = useMobileScreen();
const shouldTightBorder =
config.tightBorder && !isMobileScreen && !getClientConfig()?.isApp;

useEffect(() => {
loadAsyncGoogleFont();
Expand All @@ -134,11 +139,9 @@ function Screen() {
<div
className={
styles.container +
` ${
config.tightBorder && !isMobileScreen
? styles["tight-container"]
: styles.container
} ${getLang() === "ar" ? styles["rtl-screen"] : ""}`
` ${shouldTightBorder ? styles["tight-container"] : styles.container} ${
getLang() === "ar" ? styles["rtl-screen"] : ""
}`
}
>
{isAuth ? (
Expand Down

0 comments on commit 588e907

Please sign in to comment.