Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
feat: add streaming on console/dashboard page
Browse files Browse the repository at this point in the history
  • Loading branch information
jspark2000 committed Feb 29, 2024
1 parent 1508062 commit 5cd3167
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import Section from '@/components/Section'
import { Skeleton } from '@/components/ui/skeleton'

export default function ProfileSectionSkeleton() {
return (
<Section title="내 정보">
<div className="grid h-full grid-cols-3 gap-x-2 gap-y-5">
<div className="col-span-3 flex items-center justify-center sm:col-span-1">
<Skeleton className="h-20 w-20 rounded-full" />
</div>
<div className="col-span-3 flex h-full flex-col items-center justify-center space-y-1.5 sm:col-span-2 sm:items-start">
<Skeleton className="h-[20px] w-52 rounded-full" />
<Skeleton className="h-[20px] w-52 rounded-full" />
<Skeleton className="h-[20px] w-52 rounded-full" />
<Skeleton className="h-[20px] w-52 rounded-full" />
</div>
</div>
</Section>
)
}
6 changes: 5 additions & 1 deletion frontend/src/app/console/dashboard/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import { Suspense } from 'react'
import { NoticeSection } from './_components/NoticeSection'
import { ProfileSection } from './_components/ProfileSection'
import ProfileSectionSkeleton from './_components/ProfileSectionSkeleton'

export default function ConsoleHome() {
return (
<main className="mx-auto flex w-full flex-grow flex-col items-center justify-center">
<div className="flex w-full flex-grow flex-col gap-5 py-4 sm:px-6 md:grid md:grid-cols-12">
<div className="col-span-12 grid h-full grid-cols-12 gap-5 md:h-1/4">
<div className="col-span-12 overflow-hidden md:col-span-6 lg:col-span-4">
<ProfileSection />
<Suspense fallback={<ProfileSectionSkeleton />}>
<ProfileSection />
</Suspense>
</div>
<div className="col-span-12 overflow-hidden md:col-span-6 lg:col-span-8">
<NoticeSection />
Expand Down

0 comments on commit 5cd3167

Please sign in to comment.