update pay function
This commit is contained in:
14
boilerplate-chakra-pro-main/components/dashboard/page.tsx
Normal file
14
boilerplate-chakra-pro-main/components/dashboard/page.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { getUser } from '@/utils/supabase/queries';
|
||||
import { redirect } from 'next/navigation';
|
||||
import { createClient } from '@/utils/supabase/server';
|
||||
|
||||
export default async function Dashboard() {
|
||||
const supabase = createClient();
|
||||
const [user] = await Promise.all([getUser(supabase)]);
|
||||
|
||||
if (!user) {
|
||||
return redirect('/dashboard/signin');
|
||||
} else {
|
||||
redirect('/dashboard/main');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user