Skip to content

Commit da7e396

Browse files
committed
feat: mypage 모바일뷰 네비게이션툴 개선
1 parent f757514 commit da7e396

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

src/app/(main)/mypage/page.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,18 +204,25 @@ function MyPageContent() {
204204
key={tab.key}
205205
onClick={() => handleTabChange(tab.key)}
206206
className={clsx(
207-
"flex-1 flex items-center justify-center gap-2 py-3 px-4 rounded-2xl text-sm font-medium transition-all duration-200",
207+
"flex-1 flex flex-col sm:flex-row items-center justify-center gap-1 sm:gap-2 py-2.5 sm:py-3 px-1 sm:px-4 rounded-2xl font-medium transition-all duration-200",
208208
isActive
209209
? "bg-gray-900 dark:bg-gray-100 text-white dark:text-gray-900 shadow-sm"
210210
: "text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 hover:bg-gray-50 dark:hover:bg-navy-700"
211211
)}
212212
>
213-
<Icon className="w-4 h-4" />
214-
{tab.label}
213+
<div className="relative">
214+
<Icon className="w-5 h-5 sm:w-4 sm:h-4" />
215+
{tab.badge !== undefined && tab.badge > 0 && (
216+
<span className="sm:hidden absolute -top-1.5 -right-1.5 min-w-[16px] h-4 px-1 flex items-center justify-center text-[10px] font-semibold rounded-full bg-red-500 text-white">
217+
{tab.badge > 9 ? "9+" : tab.badge}
218+
</span>
219+
)}
220+
</div>
221+
<span className="text-[11px] sm:text-sm leading-none whitespace-nowrap">{tab.label}</span>
215222
{tab.badge !== undefined && tab.badge > 0 && (
216223
<span
217224
className={clsx(
218-
"min-w-[20px] h-5 px-1.5 flex items-center justify-center text-xs font-semibold rounded-full",
225+
"hidden sm:flex min-w-[20px] h-5 px-1.5 items-center justify-center text-xs font-semibold rounded-full",
219226
isActive
220227
? "bg-red-500 text-white"
221228
: "bg-red-100 dark:bg-red-900/30 text-red-600 dark:text-red-400"

0 commit comments

Comments
 (0)