Skip to content

Commit

Permalink
BUG: Empty staff list shows student's empty state #232 (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
hieungo89 authored Nov 8, 2023
1 parent e4abb62 commit 3aa00f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/table/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function EnhancedTableToolbar({
}: EnhancedTableToolbarProps) {
return (
<>
{totalRows === 0 ? (
{totalRows === 0 && type === "Students" ? (
<h2 className={$table.tableTitle}>{type}</h2>
) : (
<Toolbar
Expand Down Expand Up @@ -334,7 +334,7 @@ export default function EnhancedTable<
searchParam={searchParam}
onSearch={handleSearch}
/>
{people.length === 0 && !showInput && (
{people.length === 0 && !showInput && type === "Students" && (
<Container sx={{ marginTop: "4rem" }}>
<Box
sx={{
Expand All @@ -359,7 +359,7 @@ export default function EnhancedTable<
</Container>
)}

{(people.length || showInput) && (
{(people.length || showInput || type === "Staff") && (
<TableContainer>
<Table sx={{ minWidth: 750 }} aria-labelledby={`Table of ${type}s`}>
<EnhancedTableHead
Expand Down

0 comments on commit 3aa00f0

Please sign in to comment.