import Head from "next/head"; import prisma from "../../lib/prisma"; import Shell from "../../components/Shell"; import SettingsShell from "../../components/Settings"; import { getSession, useSession } from "next-auth/client"; import Loader from "@components/Loader"; export default function Embed(props) { // eslint-disable-next-line @typescript-eslint/no-unused-vars const [session, loading] = useSession(); if (loading) { return ; } return ( Embed | Calendso iframe Embed The easiest way to embed Calendso on your website. Standard iframe ' } readOnly /> Responsive full screen iframe Schedule a meeting' } readOnly /> Calendso API Leverage our API for full control and customizability. Browse our API documentation ); } export async function getServerSideProps(context) { const session = await getSession(context); if (!session) { return { redirect: { permanent: false, destination: "/auth/login" } }; } const user = await prisma.user.findFirst({ where: { email: session.user.email, }, select: { id: true, username: true, name: true, email: true, bio: true, avatar: true, timeZone: true, weekStart: true, }, }); const BASE_URL = process.env.BASE_URL; return { props: { user, BASE_URL }, // will be passed to the page component as props }; }
The easiest way to embed Calendso on your website.
Leverage our API for full control and customizability.