diff --git a/app/layout.tsx b/app/layout.tsx
index f7a8fb1..b43bbb7 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -7,6 +7,8 @@ import NavbarSm from "@/components/NavbarSm";
import Provider from "../utils/Provider";
import { Toaster as SonnerToaster } from "@/components/ui/sonner";
import ProgressBarProviders from "@/components/ProgressBar";
+import { unstable_noStore as noStore } from "next/cache";
+import { EnvScript, PublicEnvScript } from "next-runtime-env";
const inter = Inter({ subsets: ["latin"] });
export const metadata: Metadata = {
@@ -18,9 +20,13 @@ export default function RootLayout({
children,
}: {
children: React.ReactNode;
-}) {
+ }) {
+ noStore();
return (
+
+
+
diff --git a/package-lock.json b/package-lock.json
index e389ca3..6c7f4ee 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "sootzani",
- "version": "0.1.15",
+ "version": "0.1.16",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sootzani",
- "version": "0.1.15",
+ "version": "0.1.16",
"dependencies": {
"@hookform/resolvers": "^3.3.2",
"@radix-ui/react-alert-dialog": "^1.0.5",
@@ -40,6 +40,7 @@
"lucide-react": "^0.292.0",
"next": "14.0.3",
"next-nprogress-bar": "^2.1.2",
+ "next-runtime-env": "^3.2.0",
"next-themes": "^0.2.1",
"npm": "^10.2.5",
"react": "^18.2.0",
@@ -4834,6 +4835,19 @@
"nprogress": "^0.2.0"
}
},
+ "node_modules/next-runtime-env": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/next-runtime-env/-/next-runtime-env-3.2.0.tgz",
+ "integrity": "sha512-rwe3flUgSRm51hzRN4Vt5MMSYMS4aDMEPJa0r+CMONA3UyUZl8Y5O8zjHSIlaNb3yquTCttZ0ahObPyPprBj9g==",
+ "dependencies": {
+ "next": "^14",
+ "react": "^18"
+ },
+ "peerDependencies": {
+ "next": "^14",
+ "react": "^18"
+ }
+ },
"node_modules/next-themes": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.2.1.tgz",
diff --git a/package.json b/package.json
index 6767586..d2a79c5 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "sootzani",
- "version": "0.1.15",
+ "version": "0.1.16",
"private": true,
"scripts": {
"dev": "next dev",
@@ -41,6 +41,7 @@
"lucide-react": "^0.292.0",
"next": "14.0.3",
"next-nprogress-bar": "^2.1.2",
+ "next-runtime-env": "^3.2.0",
"next-themes": "^0.2.1",
"npm": "^10.2.5",
"react": "^18.2.0",
diff --git a/utils/authenticateApi.ts b/utils/authenticateApi.ts
index a69929b..2f4a8c4 100644
--- a/utils/authenticateApi.ts
+++ b/utils/authenticateApi.ts
@@ -5,8 +5,9 @@ import {
getCookie,
setCookie,
} from "cookies-next";
-
-axios.defaults.baseURL = process.env.NEXT_PUBLIC_BASE_URL_APP;
+import { env } from "next-runtime-env";
+const NEXT_PUBLIC_BASE_URL_APP = env("NEXT_PUBLIC_BASE_URL_APP");
+axios.defaults.baseURL = NEXT_PUBLIC_BASE_URL_APP;
let isRefreshing = false;
axios.interceptors.response.use(
diff --git a/utils/citizenApi.ts b/utils/citizenApi.ts
index 1465766..fcc681c 100644
--- a/utils/citizenApi.ts
+++ b/utils/citizenApi.ts
@@ -1,7 +1,8 @@
import axios from "axios";
import { CookieValueTypes, getCookie } from "cookies-next";
-
-axios.defaults.baseURL = process.env.NEXT_PUBLIC_BASE_URL_APP;
+import { env } from "next-runtime-env";
+const NEXT_PUBLIC_BASE_URL_APP = env("NEXT_PUBLIC_BASE_URL_APP");
+axios.defaults.baseURL = NEXT_PUBLIC_BASE_URL_APP;
axios.interceptors.request.use(function (config) {
const token = getCookie("Sootzani_Token");