File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import { BankAccountManager } from './bank-account-manager'
99export default async function AdminBankAccountsPage ( ) {
1010 const supabase = await createClient ( )
1111 const { data : { user } } = await supabase . auth . getUser ( )
12- if ( ! user ) redirect ( '/auth/login ' )
12+ if ( ! user ) redirect ( '/' )
1313
1414 const { data : profile } = await supabase
1515 . from ( 'profiles' )
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ type DonationRow = {
2929export default async function AdminDonationsPage ( ) {
3030 const supabase = await createClient ( )
3131 const { data : { user } } = await supabase . auth . getUser ( )
32- if ( ! user ) redirect ( '/auth/login ' )
32+ if ( ! user ) redirect ( '/' )
3333
3434 const { data : profile } = await supabase
3535 . from ( 'profiles' )
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ export default async function AdminLoanManagePage({
4141} ) {
4242 const supabase = await createClient ( )
4343 const { data : { user } } = await supabase . auth . getUser ( )
44- if ( ! user ) redirect ( '/auth/login ' )
44+ if ( ! user ) redirect ( '/' )
4545
4646 const { data : profile } = await supabase
4747 . from ( 'profiles' )
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { NewLoanForm } from './new-loan-form'
66export default async function NewLoanPage ( ) {
77 const supabase = await createClient ( )
88 const { data : { user } } = await supabase . auth . getUser ( )
9- if ( ! user ) redirect ( '/auth/login ' )
9+ if ( ! user ) redirect ( '/' )
1010
1111 const { data : profile } = await supabase
1212 . from ( 'profiles' )
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export default async function AdminLoansListPage({
1919 const initialTab : LoansTabKey = params . tab === 'past' ? 'past' : 'active'
2020 const supabase = await createClient ( )
2121 const { data : { user } } = await supabase . auth . getUser ( )
22- if ( ! user ) redirect ( '/auth/login ' )
22+ if ( ! user ) redirect ( '/' )
2323
2424 const { data : profile } = await supabase
2525 . from ( 'profiles' )
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import Link from 'next/link'
77export default async function AdminPage ( ) {
88 const supabase = await createClient ( )
99 const { data : { user } } = await supabase . auth . getUser ( )
10- if ( ! user ) redirect ( '/auth/login ' )
10+ if ( ! user ) redirect ( '/' )
1111
1212 const { data : profile } = await supabase
1313 . from ( 'profiles' )
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { PendingPaymentRow } from './pending-payment-row'
66export default async function PendingPaymentsPage ( ) {
77 const supabase = await createClient ( )
88 const { data : { user } } = await supabase . auth . getUser ( )
9- if ( ! user ) redirect ( '/auth/login ' )
9+ if ( ! user ) redirect ( '/' )
1010
1111 const { data : profile } = await supabase
1212 . from ( 'profiles' )
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export default async function EditPollPage({
99 const { id } = await params
1010 const supabase = await createClient ( )
1111 const { data : { user } } = await supabase . auth . getUser ( )
12- if ( ! user ) redirect ( '/auth/login ' )
12+ if ( ! user ) redirect ( '/' )
1313 const { data : profile } = await supabase
1414 . from ( 'profiles' ) . select ( 'role' ) . eq ( 'id' , user . id ) . maybeSingle ( )
1515 if ( profile ?. role !== 'admin' ) redirect ( `/polls/${ id } ` )
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export default async function AdminPollDetailPage({
2020 const { id } = await params
2121 const supabase = await createClient ( )
2222 const { data : { user } } = await supabase . auth . getUser ( )
23- if ( ! user ) redirect ( '/auth/login ' )
23+ if ( ! user ) redirect ( '/' )
2424 const { data : profile } = await supabase
2525 . from ( 'profiles' )
2626 . select ( 'role' )
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { NewPollForm } from './new-poll-form'
66export default async function NewPollPage ( ) {
77 const supabase = await createClient ( )
88 const { data : { user } } = await supabase . auth . getUser ( )
9- if ( ! user ) redirect ( '/auth/login ' )
9+ if ( ! user ) redirect ( '/' )
1010 const { data : profile } = await supabase
1111 . from ( 'profiles' )
1212 . select ( 'role' )
You can’t perform that action at this time.
0 commit comments