Skip to content

Commit e52e2c6

Browse files
committed
fix: return borrow credentials & dashboard link
1 parent 7b3abe6 commit e52e2c6

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

app/page.tsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ import {
77
CreditCard,
88
ScrollText,
99
BookCopy,
10+
ChartSpline,
1011
} from 'lucide-react'
1112
import { Button } from '@/components/ui/button'
1213
import { IsLoggedIn } from '@/lib/firebase/firebase'
1314
import Landing from '@/components/landing'
1415

1516
const menuItems = [
17+
{ title: 'Dashboard', icon: ChartSpline, href: '/dashboard', level: 3 },
1618
{ title: 'Libraries', icon: Library, href: '/libraries', level: 1 },
1719
{ title: 'Books', icon: Book, href: '/books', level: 1 },
1820
{ title: 'Users', icon: Users, href: '/users', level: 3 },
@@ -25,19 +27,19 @@ const menuItems = [
2527
level: 3,
2628
},
2729
{ title: 'Borrows', icon: BookCopy, href: '/borrows', level: 3 },
28-
{
29-
title: 'My Memberships',
30-
icon: CreditCard,
31-
href: '/memberships/me',
32-
level: 2,
33-
},
34-
{
35-
title: 'My Subscriptions',
36-
icon: ScrollText,
37-
href: '/subscriptions/me',
38-
level: 2,
39-
},
40-
{ title: 'My Borrows', icon: BookCopy, href: '/borrows/me', level: 2 },
30+
// {
31+
// title: 'My Memberships',
32+
// icon: CreditCard,
33+
// href: '/memberships/me',
34+
// level: 2,
35+
// },
36+
// {
37+
// title: 'My Subscriptions',
38+
// icon: ScrollText,
39+
// href: '/subscriptions/me',
40+
// level: 2,
41+
// },
42+
// { title: 'My Borrows', icon: BookCopy, href: '/borrows/me', level: 2 },
4143
]
4244

4345
export default async function LibraryDashboard() {

lib/api/borrow.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { headers } from 'next/headers'
12
import { Borrow } from '../types/borrow'
23
import { QueryParams, ResList, ResSingle } from '../types/common'
34
import { BASE_URL } from './common'
@@ -71,6 +72,7 @@ export const returnBorrow = async (
7172
method: 'POST',
7273
body: JSON.stringify(data),
7374
headers: {
75+
...headers,
7476
'Content-Type': 'application/json',
7577
},
7678
})

0 commit comments

Comments
 (0)