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 15, 2022
1 parent 05140d0 commit 494c71b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions apps/web/app/table/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use client'

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

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

if (getTable.isLoading) {
return <Loading />
return <TableLoading />
}

if (getTable.isError) {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/components/loading.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Group, Skeleton } from '@egodb/ui'
import React from 'react'

export const Loading: React.FC = () => {
export const TableLoading: React.FC = () => {
return (
<Group fz="md" p="md">
<Skeleton h="30px" />
Expand Down

0 comments on commit 494c71b

Please sign in to comment.