28 lines
948 B
TypeScript
28 lines
948 B
TypeScript
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 Page() {
|
|
const session = await getServerSession(authOptions);
|
|
|
|
if (!session) {
|
|
redirect("/signin");
|
|
}
|
|
|
|
return (
|
|
<main className="w-full h-screen bg-black">
|
|
<div className="w-full h-full px-4 pt-12 pb-4">
|
|
<ResponsiveIframe
|
|
src={process.env.NEXT_PUBLIC_IFRAME_DRIVE_URL || ''}
|
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
|
className="relative"
|
|
style={{
|
|
marginTop: '-50px', // Adjust this value based on the Nextcloud navbar height
|
|
height: 'calc(100% + 50px)' // Compensate for the negative margin
|
|
}}
|
|
/>
|
|
</div>
|
|
</main>
|
|
);
|
|
}
|