Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/add kanban skeleton #1987

Merged
merged 4 commits into from
Dec 12, 2023
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
41 changes: 41 additions & 0 deletions apps/web/components/shared/skeleton/KanbanBoardSkeleton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import React from "react";
import Skeleton from "react-loading-skeleton";

const KanbanBoardSkeleton = () => {

const columns = Array.from(Array(3));

const tasks = Array.from(Array(2));

return (
<>
<div
className="flex flex-row justify-center gap-[20px] w-full min-h-[600px] p-[32px] bg-transparent dark:bg-[#181920]"
>
{columns.map((_, index: number)=> {
return (
<React.Fragment key={index}>
<div className="flex flex-col gap-[10px]">
<Skeleton height={40} width={325} borderRadius={10} className="dark:bg-[#353741]" />

<div className="flex flex-col gap-[5px]">
{tasks.map((_, index: number)=> {
return (
<React.Fragment key={index}>
<Skeleton height={155} width={325} borderRadius={10} className="dark:bg-[#353741]" />
</React.Fragment>
)
})}

<Skeleton height={56} width={325} borderRadius={10} className="dark:bg-[#353741]" />
</div>
</div>
</React.Fragment>
)
})}
</div>
</>
)
}

export default KanbanBoardSkeleton;
3 changes: 2 additions & 1 deletion apps/web/pages/kanban/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useKanban } from "@app/hooks/features/useKanban";
import KanbanBoardSkeleton from "@components/shared/skeleton/KanbanBoardSkeleton";
import { withAuthentication } from "lib/app/authenticator";
import { KanbanView } from "lib/features/team-members-kanban-view"
import { MainLayout } from "lib/layout";
Expand All @@ -13,7 +14,7 @@ const Kanban= () => {
{Object.keys(data).length > 0 ?
<KanbanView kanbanBoardTasks={data}/>
:
null
<KanbanBoardSkeleton/>
}
</MainLayout>
</>
Expand Down