Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/dashboard/[id]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function AboutLayout({
<Sidebar />
<div className="pl-[300px] transition-all duration-300 mobile:pl-67 tablet:pl-[150px]">
<Header />
<main>{children}</main>
<main className="pt-57">{children}</main>
</div>
</>
)
Expand Down
4 changes: 4 additions & 0 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,7 @@ body {
.BG-card {
@apply bg-[#83C8FA] dark:bg-[#000000];
}

.Border-right {
@apply border-r border-[#D9D9D9] dark:border-[#454545];
}
5 changes: 3 additions & 2 deletions src/app/shared/components/common/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import UserDropdown from './UserDropdown'

export default function Header() {
return (
<header className="BG-white Border-bottom Text-black w-full overflow-x-auto border-b px-48 py-10">
<div className="flex w-full items-center justify-between pr-16">
//px-48
<header className="z-1 BG-white Border-bottom Text-black fixed inset-x-0 top-0 w-full overflow-x-auto border-b py-10 pl-320 pr-10 mobile-wide:pl-100 tablet-wide:pl-210">
<div className="flex w-full items-center justify-between pr-16 mobile-wide:justify-end tablet-wide:justify-between">
{/* 쒌츑 λŒ€μ‹œλ³΄λ“œλͺ… */}
<div className="hidden lg:block">
<LeftHeaderContent />
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/components/common/header/RightHeaderNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function RightHeaderNav() {
const isMyDashboardPage = pathname === '/mydashboard'

return (
<nav className="Text-black hidden gap-6 whitespace-nowrap text-sm md:flex">
<nav className="Text-black flex gap-6 whitespace-nowrap text-sm md:flex">
{!isMyDashboardPage && (
<>
<NavItem
Expand Down
42 changes: 21 additions & 21 deletions src/app/shared/components/common/sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,62 +52,62 @@ export default function Sidebar(): JSX.Element {
error instanceof Error ? error.message : 'λŒ€μ‹œλ³΄λ“œ λͺ©λ‘ 뢈러였기 μ‹€νŒ¨'

return (
<aside className="BG-white Border-section mobile-wide:w-67 tablet-wide:w-160 fixed left-0 top-0 z-50 flex h-full w-300 flex-col">
<aside className="BG-white Border-right fixed left-0 top-0 z-50 flex h-full w-300 flex-col mobile-wide:w-67 tablet-wide:w-160">
{/* 둜고 μ„Ήμ…˜ */}
<div className="mobile-wide:justify-center mobile-wide:px-8 tablet-wide:px-12 flex h-70 flex-shrink-0 items-center px-20">
<div className="flex h-70 flex-shrink-0 items-center px-20 mobile-wide:justify-center mobile-wide:px-8 tablet-wide:px-12">
<Link href="/mydashboard" className="flex items-center gap-8">
<div className="mobile-wide:size-24 tablet-wide:h-30 tablet-wide:w-120 relative h-35 w-150">
<div className="relative h-35 w-150 mobile-wide:size-24 tablet-wide:h-30 tablet-wide:w-120">
{/* λ°μŠ€ν¬ν†± & νƒœλΈ”λ¦Ώ: 전체 둜고 */}
<Image
src="/images/logo-light2.svg"
alt="Coplan logo"
fill
className="mobile-wide:hidden object-contain"
className="object-contain mobile-wide:hidden"
priority
/>
{/* λͺ¨λ°”일: μ•„μ΄μ½˜λ§Œ */}
<Image
src="/images/logo-icon-light.svg"
alt="Coplan"
fill
className="mobile-wide:block hidden object-contain"
className="hidden object-contain mobile-wide:block"
priority
/>
</div>
</Link>
</div>

{/* λŒ€μ‹œλ³΄λ“œ μ„Ήμ…˜ */}
<div className="mobile-wide:px-8 mobile-wide:py-12 tablet-wide:px-12 tablet-wide:py-16 flex min-h-0 flex-1 flex-col px-20 py-24">
<div className="flex min-h-0 flex-1 flex-col px-20 py-24 mobile-wide:px-8 mobile-wide:py-12 tablet-wide:px-12 tablet-wide:py-16">
{/* 헀더 */}
<div className="mobile-wide:hidden tablet-wide:mb-16 mb-24 flex flex-shrink-0 items-center justify-between">
<h2 className="Text-gray tablet-wide:text-10 text-12 font-semibold">
<div className="mb-24 flex flex-shrink-0 items-center justify-between mobile-wide:hidden tablet-wide:mb-16">
<h2 className="Text-gray text-12 font-semibold tablet-wide:text-10">
Dash Boards
</h2>
<CreateDashboardButton onClick={() => openModal('createDashboard')} />
</div>

{/* λͺ¨λ°”일 μ „μš© + λ²„νŠΌ */}
<div className="mobile-wide:flex mb-12 hidden flex-shrink-0 justify-center">
<div className="mb-12 hidden flex-shrink-0 justify-center mobile-wide:flex">
<CreateDashboardButton onClick={() => openModal('createDashboard')} />
</div>

{/* 슀크둀 κ°€λŠ₯ν•œ λŒ€μ‹œλ³΄λ“œ λͺ©λ‘ μ»¨ν…Œμ΄λ„ˆ */}
<div
ref={containerRef}
className="mobile-wide:space-y-4 tablet-wide:space-y-6 flex-1 space-y-8 overflow-y-auto"
className="flex-1 space-y-8 overflow-y-auto mobile-wide:space-y-4 tablet-wide:space-y-6"
style={{ minHeight: '200px' }}
>
{isLoading ? (
<div className="mobile-wide:py-8 tablet-wide:py-12 flex items-center justify-center py-20">
<div className="Text-gray mobile-wide:hidden tablet-wide:text-12 text-14">
<div className="flex items-center justify-center py-20 mobile-wide:py-8 tablet-wide:py-12">
<div className="Text-gray text-14 mobile-wide:hidden tablet-wide:text-12">
λ‘œλ”©μ€‘...
</div>
{/* λͺ¨λ°”일: λ‘œλ”© μŠ€ν”Όλ„ˆλ§Œ */}
<div className="mobile-wide:block hidden size-16 animate-spin rounded-full border-2 border-gray-200 border-t-blue-500" />
<div className="hidden size-16 animate-spin rounded-full border-2 border-gray-200 border-t-blue-500 mobile-wide:block" />
</div>
) : error ? (
<div className="mobile-wide:py-8 tablet-wide:py-12 flex items-center justify-center py-20">
<div className="flex items-center justify-center py-20 mobile-wide:py-8 tablet-wide:py-12">
<div className="Text-red text-14">{errorMessage}</div>
</div>
) : allDashboards.length > 0 ? (
Expand All @@ -124,29 +124,29 @@ export default function Sidebar(): JSX.Element {

{/* μΆ”κ°€ λ‘œλ”© 쀑일 λ•Œ μŠ€μΌˆλ ˆν†€ */}
{isFetchingNextPage && (
<div className="mobile-wide:space-y-4 tablet-wide:space-y-6 space-y-8">
<div className="space-y-8 mobile-wide:space-y-4 tablet-wide:space-y-6">
{Array.from({ length: 3 }).map((_, index) => (
<div
key={`skeleton-${index}`}
className="mobile-wide:justify-center mobile-wide:gap-0 mobile-wide:p-4 tablet-wide:gap-8 tablet-wide:p-8 flex items-center gap-12 rounded-6 p-12"
className="flex items-center gap-12 rounded-6 p-12 mobile-wide:justify-center mobile-wide:gap-0 mobile-wide:p-4 tablet-wide:gap-8 tablet-wide:p-8"
>
{/* 색상 원 μŠ€μΌˆλ ˆν†€ */}
<div className="mobile-wide:size-12 tablet-wide:size-6 size-8 animate-pulse rounded-full bg-gray-200" />
<div className="size-8 animate-pulse rounded-full bg-gray-200 mobile-wide:size-12 tablet-wide:size-6" />
{/* 제λͺ© μŠ€μΌˆλ ˆν†€ - λͺ¨λ°”μΌμ—μ„œ μˆ¨κΉ€ */}
<div className="mobile-wide:hidden tablet-wide:h-14 h-16 flex-1 animate-pulse rounded-4 bg-gray-200" />
<div className="h-16 flex-1 animate-pulse rounded-4 bg-gray-200 mobile-wide:hidden tablet-wide:h-14" />
</div>
))}
</div>
)}

{/* 더 이상 데이터가 없을 λ•Œ */}
{!hasNextPage && allDashboards.length > 0 && (
<div className="mobile-wide:py-4 tablet-wide:py-8 py-12 text-center">
<p className="Text-gray mobile-wide:hidden tablet-wide:text-10 text-12">
<div className="py-12 text-center mobile-wide:py-4 tablet-wide:py-8">
<p className="Text-gray text-12 mobile-wide:hidden tablet-wide:text-10">
λͺ¨λ“  λŒ€μ‹œλ³΄λ“œλ₯Ό ν™•μΈν–ˆμŠ΅λ‹ˆλ‹€.
</p>
{/* λͺ¨λ°”일: μ™„λ£Œ μ•„μ΄μ½˜λ§Œ */}
<div className="Text-gray mobile-wide:block hidden text-12">
<div className="Text-gray hidden text-12 mobile-wide:block">
βœ“
</div>
</div>
Expand Down
Loading