Skip to content

Commit fc6fade

Browse files
authored
Merge pull request #252 from What-Today-FE/feat/kjhyun/245
모바일 UI 리팩토링
2 parents 8ab17db + ebef53f commit fc6fade

File tree

7 files changed

+14
-26
lines changed

7 files changed

+14
-26
lines changed

apps/what-today/src/components/MypageSidebar.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,6 @@ export default function MypageSidebar({ onLogoutClick, onClick, isOpen }: Mypage
7272
'md:flex',
7373
)}
7474
>
75-
{/* {profileImgUrl ? (
76-
<img
77-
alt='프로필 이미지'
78-
className='bg-white-100 size-120 rounded-full border border-gray-50 object-cover'
79-
src={profileImgUrl}
80-
/>
81-
) : (
82-
<ProfileLogo className='rounded-full' size={120} />
83-
)} */}
8475
<ul className='flex w-full flex-col justify-center gap-4'>
8576
{items.map(({ label, icon: Icon, to }) => {
8677
const isSelected = location.pathname === to;

apps/what-today/src/index.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@
5858
color: var(--color-gray-950);
5959
background-color: white;
6060
}
61+
62+
font {
63+
word-break: break-all;
64+
}
6165
}
6266

6367
@layer components {

apps/what-today/src/layouts/Mypage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export default function MyPageLayout() {
4848
<ChevronIcon className='h-16' color='var(--color-gray-600)' direction='right' />
4949
</Button>
5050
{/* Outlet으로 상세 화면 표시 */}
51-
<div className='flex-1 p-4'>
51+
<div className='flex-1 overflow-x-hidden p-4 md:max-w-768 xl:max-w-635'>
5252
<Outlet />
5353
</div>
5454
</div>

apps/what-today/src/pages/mypage/reservations-list/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export default function ReservationsListPage() {
290290
<p className='body-text text-gray-400 md:pt-10'>예약내역 변경 및 취소할 수 있습니다.</p>
291291
</header>
292292

293-
<section className='mb-10'>
293+
<section className='mb-10 overflow-x-hidden'>
294294
<RadioGroup
295295
radioGroupClassName='flex flex-nowrap gap-6 overflow-x-auto no-scrollbar'
296296
selectedValue={selectedStatus}

packages/design-system/src/components/RadioGroup/RadioGroup.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ export default function RadioGroup({
101101
<motion.div
102102
animate={{ x: 0, opacity: 1 }}
103103
className={twMerge('no-scrollbar flex flex-nowrap gap-4 overflow-x-auto scroll-smooth', radioGroupClassName)}
104+
initial={{ x: 0, opacity: 1 }}
104105
style={{
105106
scrollbarWidth: 'none',
106107
msOverflowStyle: 'none',
@@ -170,7 +171,7 @@ RadioGroup.Radio = function Radio({ value, children, className = '', name = 'rad
170171
<label className='cursor-pointer select-none' htmlFor={id}>
171172
<input
172173
checked={isSelected}
173-
className='sr-only'
174+
className='sr-only hidden'
174175
id={id}
175176
name={name || 'radioGroup'}
176177
role='radio'

packages/design-system/src/components/ReservationCard.tsx

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import UserBadge from './UserBadge';
2+
13
interface ReservationCardProps {
24
/**
35
* 체험 제목
@@ -73,26 +75,16 @@ export default function ReservationCard({
7375
onClick,
7476
}: ReservationCardProps) {
7577
const formatPrice = (value: number) => value.toLocaleString('ko');
76-
// badge 컴포넌트로 수정 예정
77-
const reservationStatus = {
78-
pending: { badge: '신청 완료', style: 'bg-[#DAF0FF] text-[#0D6CD1]' },
79-
confirmed: { badge: '예약 승인', style: 'bg-[#DDF9F9] text-[#1790A0]' },
80-
declined: { badge: '예약 거절', style: 'bg-[#FCECEA] text-[#F96767]' },
81-
canceled: { badge: '예약 취소', style: 'bg-[#E0E0E5] text-[#707177]' },
82-
completed: { badge: '체험 완료', style: 'bg-[#E9FBE4] text-[#2BA90D]' },
83-
};
84-
const { badge, style } = reservationStatus[status];
8578

8679
return (
8780
<article
88-
className='flex h-150 cursor-pointer items-stretch -space-x-38 rounded-2xl border border-gray-50 md:h-160 md:-space-x-20 xl:-space-x-26'
81+
className='flex h-fit w-auto cursor-pointer items-stretch -space-x-38 rounded-2xl border border-gray-50 md:-space-x-20 xl:-space-x-26'
8982
onClick={onClick}
9083
>
9184
<section className='z-5 flex w-full flex-col justify-between rounded-l-2xl rounded-r-3xl bg-white p-20 xl:gap-6'>
9285
<div className='flex flex-col gap-4 xl:gap-6'>
93-
{/* badge 컴포넌트로 수정 예정 */}
94-
<span className={`caption-text w-fit rounded-full px-8 py-2 text-center font-bold ${style}`}>{badge}</span>
95-
<h3 className='section-text'>{title}</h3>
86+
<UserBadge status={status} />
87+
<h3 className='section-text line-clamp-7 md:line-clamp-3'>{title}</h3>
9688
</div>
9789
<div className='body-text text-gray-400'>
9890
<time>{startTime}</time>-<time>{endTime}</time>

packages/design-system/src/components/UserBadge.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default function UserBadge({ status }: UserBadgeProps) {
3232
const { label, style } = reservationStatus[status];
3333

3434
const baseClass =
35-
' flex items-center justify-center gap-2 w-auto rounded-full px-6 py-1 text-center caption-text font-bold';
35+
' flex items-center justify-center gap-2 w-fit rounded-full px-8 py-2 text-center caption-text font-bold';
3636

3737
return (
3838
<span className={twMerge(baseClass, style)} role='status'>

0 commit comments

Comments
 (0)