Skip to content

Commit fa1d2df

Browse files
Removed unused login page
1 parent 2fd52cf commit fa1d2df

22 files changed

Lines changed: 53 additions & 97 deletions

File tree

src/app/(app)/admin/bank-accounts/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { BankAccountManager } from './bank-account-manager'
99
export 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')

src/app/(app)/admin/donations/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type DonationRow = {
2929
export 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')

src/app/(app)/admin/loans/[loan_number]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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')

src/app/(app)/admin/loans/new/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { NewLoanForm } from './new-loan-form'
66
export 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')

src/app/(app)/admin/loans/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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')

src/app/(app)/admin/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Link from 'next/link'
77
export 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')

src/app/(app)/admin/pending/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { PendingPaymentRow } from './pending-payment-row'
66
export 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')

src/app/(app)/admin/polls/[id]/edit/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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}`)

src/app/(app)/admin/polls/[id]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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')

src/app/(app)/admin/polls/new/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { NewPollForm } from './new-poll-form'
66
export 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')

0 commit comments

Comments
 (0)