import { getServerSession } from "next-auth/next";
import { authOptions } from "@/app/api/auth/options";
import { redirect } from "next/navigation";
import { ResponsiveIframe } from "@/app/components/responsive-iframe";
export default async function LivresPage() {
const session = await getServerSession(authOptions);
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.