Skip to content

Commit 4e8354b

Browse files
committed
feat: 프로필 페이지 추가
1 parent d4058fe commit 4e8354b

File tree

6 files changed

+61
-34
lines changed

6 files changed

+61
-34
lines changed

src/components/common/Calendar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export default function Calendar() {
177177

178178
return (
179179
<div>
180-
<div className="rounded bg-white p-6 px-4 sm:px-0">
180+
<div className="rounded bg-white p-6 px-4">
181181
<FullCalendar
182182
ref={calendarRef}
183183
plugins={[dayGridPlugin, interactionPlugin]}

src/components/common/SideBar/SideBarProfile.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ const SideBarProfile: FC<Props> = ({ userName, imageUrl }) => {
1515

1616
return (
1717
<div className="flex w-full flex-row justify-between border-b-2 border-white pb-4">
18-
<div className="flex flex-row items-center gap-1 text-lg">
18+
<Link to={`/profile`} className="flex flex-row items-center gap-1 text-lg">
1919
<ProfileIcon imageUrl={imageUrl} />
2020
<span className="ml-2">{userName}</span>
21-
</div>
21+
</Link>
2222
<div className="flex flex-row items-center gap-2">
2323
<Link to="/" className="cursor-pointer rounded-lg bg-base-100 px-3 py-1 font-black hover:opacity-50">
2424
내 캘린더 보기

src/main.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import ProtectedRoute from './providers/ProtectedRoute.tsx';
1111
import EditGroupSchedule from './pages/EditGroupSchedulePage.tsx';
1212
import AddGroupSchedulePage from './pages/AddGroupSchedulePage.tsx';
1313
import GroupSchedulePage from './pages/GroupSchedulePage.tsx';
14+
import ProfilePage from './pages/ProfilePage.tsx';
1415

1516
const router = createBrowserRouter([
1617
{
@@ -78,6 +79,10 @@ const router = createBrowserRouter([
7879
},
7980
],
8081
},
82+
{
83+
path: '/profile',
84+
element: <ProfilePage />,
85+
},
8186
],
8287
},
8388
]);

src/pages/MyCalendarPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const MyCalendarPage: React.FC = () => {
99
<AppBar backButton={false} IconButton={<HamburgerButton />} calendarName="내 캘린더" />
1010
<main className="z-1 relative flex-grow">
1111
<div className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
12-
<div className="rounded bg-white p-6 px-4 sm:px-0">
12+
<div className="rounded p-6 px-4 sm:px-0">
1313
<Calendar />
1414
</div>
1515
</div>

src/pages/ProfilePage.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { useGetProfile } from '@/react-queries/userGetProfile';
2+
3+
const ProfilePage = () => {
4+
const { data: user, error, isLoading, isError } = useGetProfile();
5+
console.log(user)
6+
7+
if (isError) {
8+
// TODO: 추후 에러 처리
9+
console.error(error);
10+
}
11+
12+
return (
13+
<div>
14+
{isLoading && <span className="loading" />}
15+
<h1>프로필</h1>
16+
<p>여기는 프로필 페이지입니다.</p>
17+
</div>
18+
);
19+
};
20+
21+
export default ProfilePage;

src/styles/index.css

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
@tailwind components;
33
@tailwind utilities;
44

5+
@layer base {
6+
@font-face {
7+
font-family: 'Pretendard-Regular';
8+
src: url('https://fastly.jsdelivr.net/gh/Project-Noonnu/[email protected]/Pretendard-Regular.woff') format('woff');
9+
font-weight: 400;
10+
font-style: normal;
11+
}
12+
}
13+
514
.userInvite {
615
display: flex;
716
justify-content: center;
@@ -15,36 +24,6 @@
1524
margin: auto;
1625
}
1726

18-
@media (min-width: 1024px) {
19-
.drawer-toggle {
20-
display: none;
21-
}
22-
.drawer-content {
23-
flex-direction: row;
24-
}
25-
.drawer-side {
26-
width: 15%;
27-
visibility: visible;
28-
overflow-y: auto;
29-
}
30-
.drawer-side > *:not(.drawer-overlay) {
31-
transform: translateX(0%);
32-
}
33-
34-
.drawer-overlay {
35-
visibility: visible;
36-
}
37-
}
38-
39-
@layer base {
40-
@font-face {
41-
font-family: 'Pretendard-Regular';
42-
src: url('https://fastly.jsdelivr.net/gh/Project-Noonnu/[email protected]/Pretendard-Regular.woff') format('woff');
43-
font-weight: 400;
44-
font-style: normal;
45-
}
46-
}
47-
4827
/* 캘린더 - 화살표 아이콘 */
4928
.fc .fc-button-primary:hover {
5029
background-color: var(--fc-event-text-color);
@@ -90,3 +69,25 @@
9069
}
9170
}
9271
}
72+
73+
@media (min-width: 1024px) {
74+
.drawer-toggle {
75+
display: none;
76+
}
77+
.drawer-content {
78+
flex-direction: row;
79+
}
80+
.drawer-side {
81+
width: 15%;
82+
visibility: visible;
83+
overflow-y: auto;
84+
pointer-events: auto;
85+
}
86+
.drawer-side > *:not(.drawer-overlay) {
87+
transform: translateX(0%);
88+
}
89+
90+
.drawer-overlay {
91+
visibility: visible;
92+
}
93+
}

0 commit comments

Comments
 (0)