Skip to content

Commit 4de4e8e

Browse files
feat(site): Show total of items in the workspaces table (#7774)
1 parent 80b60e1 commit 4de4e8e

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

site/src/pages/WorkspacesPage/WorkspacesPageView.tsx

+24
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import { Filter } from "./filter/filter"
2121
import { hasError, isApiValidationError } from "api/errors"
2222
import { workspaceFilterQuery } from "utils/filters"
2323
import { SearchBarWithFilter } from "components/SearchBarWithFilter/SearchBarWithFilter"
24+
import Box from "@mui/material/Box"
25+
import Skeleton from "@mui/material/Skeleton"
2426

2527
export const Language = {
2628
pageTitle: "Workspaces",
@@ -143,6 +145,28 @@ export const WorkspacesPageView: FC<
143145
/>
144146
)}
145147
</Stack>
148+
149+
<Box
150+
sx={{
151+
fontSize: 13,
152+
mb: 2,
153+
mt: 1,
154+
color: (theme) => theme.palette.text.secondary,
155+
"& strong": { color: (theme) => theme.palette.text.primary },
156+
}}
157+
>
158+
{workspaces ? (
159+
<>
160+
Showing <strong>{workspaces?.length}</strong> of{" "}
161+
<strong>{count}</strong> workspaces
162+
</>
163+
) : (
164+
<Box sx={{ height: 24, display: "flex", alignItems: "center" }}>
165+
<Skeleton variant="text" width={160} height={16} />
166+
</Box>
167+
)}
168+
</Box>
169+
146170
<WorkspacesTable
147171
workspaces={workspaces}
148172
isUsingFilter={

0 commit comments

Comments
 (0)