From 7cbcd8f28ef66281f1144c9ac30776b2a93394b4 Mon Sep 17 00:00:00 2001 From: AmirHossein Mahmoodi Date: Tue, 2 Jan 2024 11:30:10 +0330 Subject: [PATCH 1/2] fixed bug --- src/core/utils/globalServerProps.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/utils/globalServerProps.js b/src/core/utils/globalServerProps.js index ef8e1b8..dffb0f2 100644 --- a/src/core/utils/globalServerProps.js +++ b/src/core/utils/globalServerProps.js @@ -1,10 +1,13 @@ import {parse} from "next-useragent"; +import process from "next/dist/build/webpack/loaders/resolve-url-loader/lib/postcss"; export const globalServerProps = async ({req, locale}) => { const {isBot} = parse(req.headers["user-agent"]); + const responseConfig = await fetch(process.env.NEXT_PUBLIC_CONFIG_APP_URL); + return { - config: (await import(`&/config.json`)).default, + config: await responseConfig.json(), messages: (await import(`&/locales/${locale}/app.json`)).default, isBot, locale, From 3dd7913d5ac4b631c7e9470b4244f9578dc6bb41 Mon Sep 17 00:00:00 2001 From: AmirHossein Mahmoodi Date: Tue, 2 Jan 2024 11:30:40 +0330 Subject: [PATCH 2/2] change version --- example.env.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example.env.local b/example.env.local index 165c316..9ec9ec4 100644 --- a/example.env.local +++ b/example.env.local @@ -1,5 +1,5 @@ NEXT_PUBLIC_API_NAME = "Loan Facilities Dashboard" -NEXT_PUBLIC_API_VERSION = "1.26.12" +NEXT_PUBLIC_API_VERSION = "1.26.14" NEXT_PUBLIC_DEFAULT_LANGUAGE = "fa" NEXT_PUBLIC_DEFAULT_DIRECTION = "rtl"