Skip to content

Commit

Permalink
🎨 design(#166): λŒ€μ‹œλ³΄λ“œ νŽ˜μ΄μ§€, 컬럼 μ„Ήμ…˜μ— λ‘œλ”© μŠ€ν”Όλ„ˆ 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
wayandway committed Jul 8, 2024
1 parent be65f06 commit cf10d12
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/containers/dashboard/ColumnsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Image from 'next/image';
import { DragDropContext, Droppable, DropResult } from 'react-beautiful-dnd';

import Column from './Column';
import ColumnSkeleton from './ColumnSkeleton';

import useFetchData from '@/hooks/useFetchData';
import useModal from '@/hooks/useModal';
Expand Down Expand Up @@ -59,7 +58,11 @@ export default function ColumnsSection({ dashboardId }: ColumnsSectionProps) {
}

return isLoading ? (
<ColumnSkeleton />
<div className='flex h-screen items-center justify-center'>
<div className='align-center opacity-50 invert dark:invert-0'>
<Image src='/icons/spinner.svg' alt='μŠ€ν”Όλ„ˆ μ•„μ΄μ½˜' width={50} height={50} />
</div>
</div>
) : (
<DragDropContext onDragEnd={onDragEnd}>
<section className='block h-full overflow-x-auto lg:flex lg:w-[calc(100dvw-300px)]'>
Expand Down
10 changes: 8 additions & 2 deletions src/pages/dashboard/[id]/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
import Image from 'next/image';
import { useRouter } from 'next/router';

import ColumnSkeleton from '@/containers/dashboard/ColumnSkeleton';
import ColumnsSection from '@/containers/dashboard/ColumnsSection';

function DashboardIdPage() {
const router = useRouter();
const { id } = router.query;

if (typeof id !== 'string') {
return <ColumnSkeleton />;
return (
<div className='flex h-screen items-center justify-center'>
<div className='align-center opacity-50 invert dark:invert-0'>
<Image src='/icons/spinner.svg' alt='μŠ€ν”Όλ„ˆ μ•„μ΄μ½˜' width={50} height={50} />
</div>
</div>
);
}

return <ColumnsSection dashboardId={id} />;
Expand Down

0 comments on commit cf10d12

Please sign in to comment.