
* More type fixes * More type fixes * Type fixes * Adds inputMode to email fields * Added booking tabs * Adds aditional notes to bookings
16 lines
402 B
TypeScript
16 lines
402 B
TypeScript
import { getSession } from "@lib/auth";
|
|
|
|
function RedirectPage() {
|
|
return null;
|
|
}
|
|
|
|
export async function getServerSideProps(context) {
|
|
const session = await getSession(context);
|
|
if (!session?.user?.id) {
|
|
return { redirect: { permanent: false, destination: "/auth/login" } };
|
|
}
|
|
|
|
return { redirect: { permanent: false, destination: "/bookings/upcoming" } };
|
|
}
|
|
|
|
export default RedirectPage;
|