Cleanup. Stuff from yesterday idk

This commit is contained in:
2025-06-06 08:43:18 -05:00
parent a776c5a30a
commit 35e019558f
29 changed files with 866 additions and 694 deletions

View File

@ -2,9 +2,9 @@ import { createServerClient } from '@supabase/ssr';
import { type NextRequest, NextResponse } from 'next/server';
import type { Database } from '@/utils/supabase/types';
export const updateSession = async (request: NextRequest) => {
// This `try/catch` block is only here for the interactive tutorial.
// Feel free to remove once you have Supabase connected.
export const updateSession = async (
request: NextRequest,
): Promise<NextResponse> => {
try {
// Create an unmodified response
let response = NextResponse.next({
@ -45,15 +45,8 @@ export const updateSession = async (request: NextRequest) => {
return NextResponse.redirect(new URL('/sign-in', request.url));
}
//if (request.nextUrl.pathname === '/' && !user.error) {
//return NextResponse.redirect(new URL('/protected', request.url));
//}
return response;
} catch (e) {
// If you are here, a Supabase client could not be created!
// This is likely because you have not set up environment variables.
// Check out http://localhost:3000 for Next Steps.
return NextResponse.next({
request: {
headers: request.headers,