Skip to content

Commit

Permalink
Fix up the issues encountered while rebasing
Browse files Browse the repository at this point in the history
  • Loading branch information
woowenjun99 committed Jul 4, 2023
1 parent 501711b commit ba1a834
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
22 changes: 7 additions & 15 deletions src/components/users/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,7 @@ const TableBody = ({ table }: { table: ReactTable<User> }) => {
export default function DataTable() {
const columns = useColumns()

const { isLoading, data } = trpc.user.getAllUsersForTable.useQuery(
undefined,
{
keepPreviousData: true,
staleTime: 5000,
}
)
const { isLoading, data } = trpc.user.getAllUsersForTable.useQuery()

const table = useReactTable<User>({
columns,
Expand All @@ -169,14 +163,12 @@ export default function DataTable() {
return isLoading ? (
<LoadingScreen />
) : (
<div className="mx-auto w-3/4">
<div className="my-9 block h-14 w-14 rounded-[50%] bg-[#97AEFF]">
<Link href="/users/create">
<Button bgColor="#97AEFF" width={215} className="mb-10 text-black">
Create User(s)
</Button>
</Link>
</div>
<div className="mx-auto w-3/4 my-10">
<Link href="/users/create">
<Button bgColor="#97AEFF" width={215} className="mb-10 text-black">
Create User(s)
</Button>
</Link>

<table className="min-w-full font-[inter]">
<TableHeader table={table} />
Expand Down
1 change: 1 addition & 0 deletions src/server/trpc/router/users/getAllUsersForTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const getAllUsersForTable = protectedProcedure.query(async () => {
id: user.id as string,
name: user.name,
role: user.role,
isAdmin: user.isAdmin
}
})

Expand Down

0 comments on commit ba1a834

Please sign in to comment.