Skip to content

Commit bad18b4

Browse files
authored
Merge pull request #140 from billilge/develop
[Merge] 1차 스프린트 develop -> main
2 parents 44dfce9 + a487694 commit bad18b4

File tree

30 files changed

+379
-137
lines changed

30 files changed

+379
-137
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: (Develop) Synchronize to forked repo
2+
on:
3+
push:
4+
branches:
5+
- develop
6+
7+
jobs:
8+
sync:
9+
name: Sync forked repo
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout develop
14+
uses: actions/checkout@v4
15+
with:
16+
token: ${{ secrets.DEV_AUTO_SYNC_TOKEN }}
17+
fetch-depth: 0
18+
ref: develop
19+
20+
- name: Add remote-url
21+
run: |
22+
git remote add forked-repo https://hyeonjin6530:${{ secrets.DEV_AUTO_SYNC_TOKEN }}@github.com/hyeonjin6530/billilge-frontend
23+
git config user.name hyeonjin6530
24+
git config user.email ${{ secrets.DEV_EMAIL }}
25+
26+
- name: Push changes to forked-repo
27+
run: |
28+
git push -f forked-repo develop
29+
30+
- name: Clean up
31+
run: |
32+
git remote remove forked-repo
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
name: Synchronize to forked repo
1+
name: (Main) Synchronize to forked repo
22
on:
33
push:
44
branches:
5-
- develop
5+
- main
66

77
jobs:
88
sync:
99
name: Sync forked repo
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- name: Checkout develop
13+
- name: Checkout main
1414
uses: actions/checkout@v4
1515
with:
1616
token: ${{ secrets.AUTO_SYNC_TOKEN }}
1717
fetch-depth: 0
18-
ref: develop
18+
ref: main
1919

2020
- name: Add remote-url
2121
run: |
@@ -25,7 +25,7 @@ jobs:
2525
2626
- name: Push changes to forked-repo
2727
run: |
28-
git push -f forked-repo develop
28+
git push -f forked-repo main
2929
3030
- name: Clean up
3131
run: |

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"dotenv": "^16.4.5",
3838
"firebase": "^11.3.1",
3939
"js-base64": "^3.7.7",
40+
"js-cookie": "^3.0.5",
4041
"lodash": "^4.17.21",
4142
"lucide-react": "^0.475.0",
4243
"next": "^15.0.3",
@@ -62,6 +63,7 @@
6263
"@testing-library/dom": "^10.4.0",
6364
"@testing-library/jest-dom": "^6.6.3",
6465
"@types/jest": "^29.5.12",
66+
"@types/js-cookie": "^3.0.6",
6567
"@types/node": "^20",
6668
"@types/react": "^18",
6769
"@types/react-dom": "^18",
Lines changed: 3 additions & 0 deletions
Loading

public/assets/icons/side-menu/admin-homepage.svg

Lines changed: 120 additions & 0 deletions
Loading

src/app/callback/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { useEffect, Suspense } from 'react';
44
import { useSearchParams, useRouter } from 'next/navigation';
55
import { handleLoginSuccess } from '@/utils/loginHandler';
6+
import Cookies from 'js-cookie';
67

78
function CallbackContent() {
89
const searchParams = useSearchParams();
@@ -13,7 +14,7 @@ function CallbackContent() {
1314
const email = searchParams.get('email');
1415
const accessToken = searchParams.get('accessToken');
1516

16-
localStorage.setItem('email', email || '');
17+
Cookies.set('email', email || '');
1718

1819
if (!status) return;
1920

src/app/mobile/admin/dashboard/_components/DashboardItem.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default function DashboardItem({
99
renterName,
1010
studentId,
1111
status,
12-
applicatedAt,
12+
rentAt,
1313
rentedCount,
1414
handleApproveBtnClick,
1515
handleCancelBtnClick,
@@ -29,7 +29,7 @@ export default function DashboardItem({
2929
handleCancelBtnClick();
3030
};
3131

32-
const applicatedTime = convertTime(applicatedAt);
32+
const applicatedTime = convertTime(rentAt);
3333

3434
return (
3535
<section className="flex w-full items-center justify-between px-5 py-4">
@@ -59,9 +59,10 @@ export default function DashboardItem({
5959
</section>
6060

6161
<section className="flex gap-1">
62-
<div className="flex w-10">신청 시간</div>
62+
<div className="flex w-10">대여 시간</div>
6363
<div className="">
64-
{applicatedTime.formattedDate} {applicatedTime.formattedTime}
64+
{applicatedTime.formattedDate}{' '}
65+
{applicatedTime.formattedTime.split(':').slice(0, 2).join(':')}
6566
</div>
6667
</section>
6768
</section>

src/app/mobile/admin/dashboard/page.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use client';
22

33
import { useState, useEffect } from 'react';
4-
import MobileLayout from '@/components/mobile/layout';
54
import Header from '@/components/mobile/Header';
65
import Dropdown from '@/components/mobile/Dropdown';
76
import useDropdown from '@/hooks/useDropdown';
@@ -104,7 +103,7 @@ export default function Dashboard() {
104103
};
105104

106105
return (
107-
<MobileLayout>
106+
<div>
108107
<Header title="관리자 대시보드" />
109108

110109
<section className="itmes-center mt-2.5 flex w-full justify-between px-5">
@@ -139,7 +138,7 @@ export default function Dashboard() {
139138
renterName={item.renterName}
140139
studentId={item.studentId}
141140
status={item.status}
142-
applicatedAt={item.applicatedAt}
141+
rentAt={item.rentAt}
143142
rentedCount={item.rentedCount}
144143
handleApproveBtnClick={() => {
145144
if (item.rentalHistoryId !== undefined) {
@@ -171,6 +170,6 @@ export default function Dashboard() {
171170
hideDropdown={hideDropdown}
172171
positionClasses="top-[80px] right-5"
173172
/>
174-
</MobileLayout>
173+
</div>
175174
);
176175
}

src/app/mobile/admin/notification/page.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
'use client';
22

33
import { useEffect, useState } from 'react';
4-
import MobileLayout from '@/components/mobile/layout';
54
import NotificationItem from '@/components/mobile/NotificationItem';
65
import Header from '@/components/mobile/Header';
76
import { elapsedTime } from '@/utils/elapsedTime';
87
import { NotificationProps } from '@/types/notificationType';
98
import {
109
adminNotificationGet,
11-
readNotificationPost,
10+
readNotificationPatch,
1211
} from '@/services/notification';
1312

1413
type AdminNotificationType = NotificationProps;
@@ -28,11 +27,11 @@ export default function Notification() {
2827
}, []);
2928

3029
const handleReadNotification = async (notificationId: number) => {
31-
await readNotificationPost(notificationId);
30+
await readNotificationPatch(notificationId);
3231
};
3332

3433
return (
35-
<MobileLayout>
34+
<div>
3635
<Header title="관리자 알림" />
3736
{notificationDetail?.length === 0 ? (
3837
<div className="flex h-dvh items-center justify-center text-gray-secondary">
@@ -53,6 +52,6 @@ export default function Notification() {
5352
/>
5453
))
5554
)}
56-
</MobileLayout>
55+
</div>
5756
);
5857
}

src/app/mobile/history/page.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use client';
22

33
import { useEffect, useState, useMemo } from 'react';
4-
import MobileLayout from '@/components/mobile/layout';
54
import Header from '@/components/mobile/Header';
65
import ReturnItem from '@/app/mobile/history/_components/ReturnItem';
76
import RentalItem from '@/app/mobile/history/_components/RentalItem';
@@ -194,7 +193,7 @@ export default function UserRentalList() {
194193
);
195194

196195
return (
197-
<MobileLayout>
196+
<div>
198197
<Header title="대여 기록" menu />
199198

200199
{/* 반납이 필요한 물품 */}
@@ -287,6 +286,6 @@ export default function UserRentalList() {
287286
<div className="text-body-2-normal_medi">© wink</div>
288287
</div>
289288
</div>
290-
</MobileLayout>
289+
</div>
291290
);
292291
}

0 commit comments

Comments
 (0)