From 90e0f6de8343e3b0506173e3570166518fd94eb9 Mon Sep 17 00:00:00 2001 From: Andreas Date: Wed, 3 Jan 2024 17:02:47 +0700 Subject: [PATCH 1/2] Re-added Viewport --- www/app/[domain]/layout.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/www/app/[domain]/layout.tsx b/www/app/[domain]/layout.tsx index bfcfc11f..cce65fc3 100644 --- a/www/app/[domain]/layout.tsx +++ b/www/app/[domain]/layout.tsx @@ -1,6 +1,6 @@ import "../styles/globals.scss"; import { Poppins } from "next/font/google"; -import { Metadata } from "next"; +import { Metadata, Viewport } from "next"; import FiefWrapper from "../(auth)/fiefWrapper"; import UserInfo from "../(auth)/userInfo"; import { ErrorProvider } from "../(errors)/errorContext"; @@ -18,6 +18,13 @@ import { Providers } from "../providers"; const poppins = Poppins({ subsets: ["latin"], weight: ["200", "400", "600"] }); +export const viewport: Viewport = { + themeColor: "black", + width: "device-width", + initialScale: 1, + maximumScale: 1, +}; + export const metadata: Metadata = { metadataBase: new URL(process.env.DEV_URL || "https://reflector.media"), title: { From bc421db43e5ca1742f4bb5d8cee1b9c1fb0c6616 Mon Sep 17 00:00:00 2001 From: Andreas Date: Wed, 3 Jan 2024 20:51:11 +0700 Subject: [PATCH 2/2] Update useApi.ts --- www/app/lib/useApi.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/www/app/lib/useApi.ts b/www/app/lib/useApi.ts index 9898f735..6f788f8e 100644 --- a/www/app/lib/useApi.ts +++ b/www/app/lib/useApi.ts @@ -18,11 +18,9 @@ export default function useApi(): DefaultService | null { return; } - if (!accessTokenInfo) return; - const openApi = new OpenApi({ BASE: api_url, - TOKEN: accessTokenInfo?.access_token, + TOKEN: accessTokenInfo ? accessTokenInfo?.access_token : undefined, }); setApi(openApi);