Browse Source

fix: should not tight border in desktop app

Yidadaa 1 year ago
parent
commit
eae7d6260f
1 changed files with 9 additions and 6 deletions
  1. 9 6
      app/components/home.tsx

+ 9 - 6
app/components/home.tsx

@@ -115,7 +115,10 @@ const loadAsyncGoogleFont = () => {
     getClientConfig()?.buildMode === "export" ? remoteFontUrl : proxyFontUrl;
     getClientConfig()?.buildMode === "export" ? remoteFontUrl : proxyFontUrl;
   linkEl.rel = "stylesheet";
   linkEl.rel = "stylesheet";
   linkEl.href =
   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);
   document.head.appendChild(linkEl);
 };
 };
 
 
@@ -125,6 +128,8 @@ function Screen() {
   const isHome = location.pathname === Path.Home;
   const isHome = location.pathname === Path.Home;
   const isAuth = location.pathname === Path.Auth;
   const isAuth = location.pathname === Path.Auth;
   const isMobileScreen = useMobileScreen();
   const isMobileScreen = useMobileScreen();
+  const shouldTightBorder =
+    config.tightBorder && !isMobileScreen && !getClientConfig()?.isApp;
 
 
   useEffect(() => {
   useEffect(() => {
     loadAsyncGoogleFont();
     loadAsyncGoogleFont();
@@ -134,11 +139,9 @@ function Screen() {
     <div
     <div
       className={
       className={
         styles.container +
         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 ? (
       {isAuth ? (