Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Empty staff list shows student's empty state #232 #233

Merged
merged 2 commits into from
Nov 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading