Skip to content

Commit

Permalink
feat: add loading status
Browse files Browse the repository at this point in the history
  • Loading branch information
WanShufen committed Dec 14, 2022
1 parent 8b9af19 commit 242a156
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/web/app/table/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client'

import { Table as CoreTable } from '@egodb/core'
import { Alert, Container, IconAlertCircle } from '@egodb/ui'
import { Alert, Container, IconAlertCircle, Skeleton } from '@egodb/ui'
import { trpc } from '../../../trpc'
import Table from './table'

Expand All @@ -10,7 +10,7 @@ export default function Page({ params: { id } }: { params: { id: string } }) {
const records = trpc.record.list.useQuery({ tableId: id })

if (getTable.isLoading) {
return 'loading'
return <Skeleton h="100vh" />
}

if (getTable.isError) {
Expand Down

0 comments on commit 242a156

Please sign in to comment.