diff --git a/app/livres/page.tsx b/app/livres/page.tsx index 461c3271..ab35de5e 100644 --- a/app/livres/page.tsx +++ b/app/livres/page.tsx @@ -9,12 +9,31 @@ export default async function LivresPage() { if (!session) { redirect("/signin"); } + + // Get the iframe URL from environment variables + const iframeUrl = process.env.NEXT_PUBLIC_IFRAME_LIVRE_URL || ''; + + // If no URL is set, show an error + if (!iframeUrl) { + return ( + + + + Configuration Error + + NEXT_PUBLIC_IFRAME_LIVRE_URL environment variable is not set. + + + + + ); + } return ( - +
+ NEXT_PUBLIC_IFRAME_LIVRE_URL environment variable is not set. +