livres
This commit is contained in:
parent
e6211f0edf
commit
e384cdd879
@ -9,12 +9,31 @@ export default async function LivresPage() {
|
|||||||
if (!session) {
|
if (!session) {
|
||||||
redirect("/signin");
|
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 (
|
||||||
|
<main className="w-full h-screen bg-white">
|
||||||
|
<div className="w-full h-full px-4 pt-12 pb-4 flex items-center justify-center">
|
||||||
|
<div className="text-center p-8 bg-red-50 rounded-lg border border-red-200">
|
||||||
|
<h2 className="text-xl font-bold text-red-600 mb-4">Configuration Error</h2>
|
||||||
|
<p className="text-gray-700">
|
||||||
|
NEXT_PUBLIC_IFRAME_LIVRE_URL environment variable is not set.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main className="w-full h-screen bg-black">
|
<main className="w-full h-screen bg-white">
|
||||||
<div className="w-full h-full px-4 pt-12 pb-4">
|
<div className="w-full h-full px-4 pt-12 pb-4">
|
||||||
<ResponsiveIframe
|
<ResponsiveIframe
|
||||||
src={process.env.NEXT_PUBLIC_IFRAME_LIVRE_URL || ''}
|
src={iframeUrl}
|
||||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user