
* E2E video adjustments * Adds test to add Stripe integration * Type fix * WIP: Payment troubleshooting * Paid bookings shouldn't be confirmed by default * Runs stripe test only if installed * BookingListItem Adjustments * Pending paid bookings should be unconfirmed * Attempt to fix paid bookings * Type fixes * Type fixes * Tests fixes * Adds paid booking to seeder * Moves stripe tests to own file * Matches app locale to Stripe's * Fixes minimun price for testing * Stripe test fixes * Fixes stripe frame test * Added some Stripe TODOs
18 lines
460 B
TypeScript
18 lines
460 B
TypeScript
import { NextPageContext } from "next";
|
|
|
|
import { getSession } from "@lib/auth";
|
|
|
|
function RedirectPage() {
|
|
return null;
|
|
}
|
|
|
|
export async function getServerSideProps(context: NextPageContext) {
|
|
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;
|