Skip to content

Commit f5cff1b

Browse files
authored
Merge pull request #167 from imaginer-dev/164---ui-프로필-수정-구현
164 UI 프로필 수정 구현 - 캘린더 레이아웃 깨짐 수정
2 parents 06d253f + b1e002d commit f5cff1b

File tree

6 files changed

+36
-10
lines changed

6 files changed

+36
-10
lines changed

src/components/common/Calendar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export default function Calendar() {
138138

139139
return (
140140
<div>
141-
<div className="rounded bg-white p-6 px-4">
141+
<div className="rounded bg-white p-7 px-4">
142142
<FullCalendar
143143
ref={calendarRef}
144144
plugins={[dayGridPlugin, interactionPlugin]}
@@ -218,7 +218,7 @@ function EventCards({ events, date }: EventCardsProps) {
218218

219219
return (
220220
<div>
221-
<h2 className="ml-2">{date}</h2>
221+
<h2 className="mb-2 ml-2">{date}</h2>
222222
<div className="flex gap-5 overflow-x-auto">
223223
{events.map((event, index) => {
224224
const eventDateRange = formatDateRange(event.start_date, event.end_date);

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
@@ -10,6 +10,7 @@ import ProtectedRoute from './providers/ProtectedRoute.tsx';
1010
import EditGroupSchedule from './pages/EditGroupSchedulePage.tsx';
1111
import AddGroupSchedulePage from './pages/AddGroupSchedulePage.tsx';
1212
import GroupSchedulePage from './pages/GroupSchedulePage.tsx';
13+
import ProfilePage from './pages/ProfilePage.tsx';
1314

1415
const router = createBrowserRouter([
1516
{
@@ -77,6 +78,10 @@ const router = createBrowserRouter([
7778
},
7879
],
7980
},
81+
{
82+
path: '/profile',
83+
element: <ProfilePage />,
84+
},
8085
],
8186
},
8287
]);

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>
1313
<Calendar />
1414
<CreateEventButton />
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: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,24 @@
7272

7373
@media (min-width: 1024px) {
7474
main {
75-
padding-left: 15%;
76-
padding-right: 25%;
75+
padding-right: 25vw;
7776
}
7877
.eventCardList {
7978
position: fixed;
8079
right: 0;
8180
top: 0;
82-
width: 25%;
81+
width: 25vw;
8382
height: 100%;
8483
padding: 0 1rem;
8584
padding-left: 0;
86-
margin-top: 4rem;
85+
margin-top: 4.5rem;
8786
}
8887
.eventCardList .flex {
8988
overflow-y: auto;
9089
overflow-x: hidden;
9190
flex-flow: column;
91+
max-height: calc(90vh - 72px);
92+
overflow-y: auto;
9293
}
9394
.drawer-toggle {
9495
display: none;
@@ -97,7 +98,6 @@
9798
flex-direction: row;
9899
}
99100
.drawer-side {
100-
width: 15%;
101101
visibility: visible;
102102
overflow-y: auto;
103103
pointer-events: auto;

0 commit comments

Comments
 (0)