Merge Dev in Staging
This commit is contained in:
commit
5eaa06d4e5
@ -4,6 +4,7 @@ import "@Front/index.scss";
|
|||||||
import type { NextPage } from "next";
|
import type { NextPage } from "next";
|
||||||
import type { AppType, AppProps } from "next/app";
|
import type { AppType, AppProps } from "next/app";
|
||||||
import type { ReactElement, ReactNode } from "react";
|
import type { ReactElement, ReactNode } from "react";
|
||||||
|
import getConfig from 'next/config'
|
||||||
|
|
||||||
export type NextPageWithLayout<TProps = Record<string, unknown>, TInitialProps = TProps> = NextPage<TProps, TInitialProps> & {
|
export type NextPageWithLayout<TProps = Record<string, unknown>, TInitialProps = TProps> = NextPage<TProps, TInitialProps> & {
|
||||||
getLayout?: (page: ReactElement) => ReactNode;
|
getLayout?: (page: ReactElement) => ReactNode;
|
||||||
@ -25,6 +26,8 @@ type AppPropsWithLayout = AppProps & {
|
|||||||
docaposteApiUrl: string;
|
docaposteApiUrl: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const { publicRuntimeConfig } = getConfig();
|
||||||
|
|
||||||
const MyApp = (({
|
const MyApp = (({
|
||||||
Component,
|
Component,
|
||||||
pageProps,
|
pageProps,
|
||||||
@ -60,18 +63,18 @@ const MyApp = (({
|
|||||||
|
|
||||||
MyApp.getInitialProps = async () => {
|
MyApp.getInitialProps = async () => {
|
||||||
return {
|
return {
|
||||||
backApiProtocol: process.env["NEXT_PUBLIC_BACK_API_PROTOCOL"],
|
backApiProtocol: publicRuntimeConfig.NEXT_PUBLIC_BACK_API_PROTOCOL,
|
||||||
backApiHost: process.env["NEXT_PUBLIC_BACK_API_HOST"],
|
backApiHost: publicRuntimeConfig.NEXT_PUBLIC_BACK_API_HOST,
|
||||||
backApiRootUrl: process.env["NEXT_PUBLIC_BACK_API_ROOT_URL"],
|
backApiRootUrl: publicRuntimeConfig.NEXT_PUBLIC_BACK_API_ROOT_URL,
|
||||||
backApiVersion: process.env["NEXT_PUBLIC_BACK_API_VERSION"],
|
backApiVersion: publicRuntimeConfig.NEXT_PUBLIC_BACK_API_VERSION,
|
||||||
frontAppHost: process.env["NEXT_PUBLIC_FRONT_APP_HOST"],
|
frontAppHost: publicRuntimeConfig.NEXT_PUBLIC_FRONT_APP_HOST,
|
||||||
frontAppPort: process.env["NEXT_PUBLIC_FRONT_APP_PORT"],
|
frontAppPort: publicRuntimeConfig.NEXT_PUBLIC_FRONT_APP_PORT,
|
||||||
idNotBaseUrl: process.env["NEXT_PUBLIC_IDNOT_BASE_URL"],
|
idNotBaseUrl: publicRuntimeConfig.NEXT_PUBLIC_IDNOT_BASE_URL,
|
||||||
idNotAuthorizeEndpoint: process.env["NEXT_PUBLIC_IDNOT_AUTHORIZE_ENDPOINT"],
|
idNotAuthorizeEndpoint: publicRuntimeConfig.NEXT_PUBLIC_IDNOT_AUTHORIZE_ENDPOINT,
|
||||||
idNotClientId: process.env["NEXT_PUBLIC_IDNOT_CLIENT_ID"],
|
idNotClientId: publicRuntimeConfig.NEXT_PUBLIC_IDNOT_CLIENT_ID,
|
||||||
fcAuthorizeEndpoint: process.env["NEXT_PUBLIC_FC_AUTHORIZE_ENDPOINT"],
|
fcAuthorizeEndpoint: publicRuntimeConfig.NEXT_PUBLIC_FC_AUTHORIZE_ENDPOINT,
|
||||||
fcClientId: process.env["NEXT_PUBLIC_FC_CLIENT_ID"],
|
fcClientId: publicRuntimeConfig.NEXT_PUBLIC_FC_CLIENT_ID,
|
||||||
docaposteApiUrl: process.env["NEXT_PUBLIC_DOCAPOST_API_URL"],
|
docaposteApiUrl: publicRuntimeConfig.NEXT_PUBLIC_DOCAPOST_API_URL,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user