From 5720661f8d056ccebfef6627be7b52ad627c0b57 Mon Sep 17 00:00:00 2001 From: streaper2 Date: Mon, 4 May 2026 21:30:10 +0200 Subject: [PATCH] maj banniere prod/dev --- .env | 4 +++- app/layout.tsx | 2 +- components/Navbar.tsx | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.env b/.env index 8971d1f..b12abdd 100644 --- a/.env +++ b/.env @@ -3,4 +3,6 @@ DATABASE_URL="postgresql://admin:adminpassword@192.168.1.25:5432/afrohub_dev?schema=public" # Exemple avec Supabase ou Neon (si base distante) -# DATABASE_URL="postgresql://postgres:[MOT_DE_PASSE]@db.[ID_PROJET].supabase.co:5432/postgres" \ No newline at end of file +# DATABASE_URL="postgresql://postgres:[MOT_DE_PASSE]@db.[ID_PROJET].supabase.co:5432/postgres" +# Environnement : "development" = accents rouges, "production" = accents normaux +NEXT_PUBLIC_APP_ENV=production \ No newline at end of file diff --git a/app/layout.tsx b/app/layout.tsx index e4c450f..655b71e 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -37,7 +37,7 @@ export async function generateMetadata(): Promise { }; } -const isDev = process.env.NODE_ENV === 'development'; +const isDev = process.env.NEXT_PUBLIC_APP_ENV === 'development'; const devBrandOverride: React.CSSProperties | undefined = isDev ? { '--color-brand-50': '#fef2f2', '--color-brand-100': '#fee2e2', diff --git a/components/Navbar.tsx b/components/Navbar.tsx index 2b0cd8b..913cbcf 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -16,7 +16,7 @@ const Navbar = ({ settings }: NavbarProps) => { const pathname = usePathname() || ''; const siteName = settings?.siteName || "Afrohub"; - const isDev = process.env.NODE_ENV === 'development'; + const isDev = process.env.NEXT_PUBLIC_APP_ENV === 'development'; // Hide Navbar on Dashboard to prevent double navigation, show only on public pages if (pathname.startsWith('/dashboard')) return null;