Skip to content

Commit a11762e

Browse files
committed
chore: use shadcn table
1 parent 0df2ddc commit a11762e

File tree

1 file changed

+40
-41
lines changed

1 file changed

+40
-41
lines changed

site/src/pages/DeploymentSettingsPage/IdpOrgSyncPage/IdpOrgSyncPageView.tsx

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
import Table from "@mui/material/Table";
2-
import TableBody from "@mui/material/TableBody";
3-
import TableCell from "@mui/material/TableCell";
4-
import TableContainer from "@mui/material/TableContainer";
5-
import TableHead from "@mui/material/TableHead";
6-
import TableRow from "@mui/material/TableRow";
71
import type {
82
Organization,
93
OrganizationSyncSettings,
@@ -48,6 +42,13 @@ import {
4842
} from "components/Popover/Popover";
4943
import { Spinner } from "components/Spinner/Spinner";
5044
import { Switch } from "components/Switch/Switch";
45+
import {
46+
Table,
47+
TableBody,
48+
TableCell,
49+
TableHeader,
50+
TableRow,
51+
} from "components/Table/Table";
5152
import { useFormik } from "formik";
5253
import { Check, ChevronDown, CornerDownLeft, Plus, Trash } from "lucide-react";
5354
import { type FC, type KeyboardEventHandler, useId, useState } from "react";
@@ -218,7 +219,7 @@ export const IdpOrgSyncPageView: FC<IdpSyncPageViewProps> = ({
218219
{form.errors.field}
219220
</p>
220221
)}
221-
<div className="flex flex-col gap-4">
222+
<div className="flex flex-col gap-7">
222223
<div className="flex flex-row pt-8 gap-2 justify-between items-start">
223224
<div className="grid items-center gap-1">
224225
<Label className="text-sm" htmlFor={`${id}-idp-org-name`}>
@@ -318,7 +319,7 @@ export const IdpOrgSyncPageView: FC<IdpSyncPageViewProps> = ({
318319
placeholder="Select organization"
319320
emptyIndicator={
320321
<p className="text-center text-md text-content-primary">
321-
All organizations selected
322+
No organizations found
322323
</p>
323324
}
324325
/>
@@ -415,40 +416,38 @@ interface IdpMappingTableProps {
415416

416417
const IdpMappingTable: FC<IdpMappingTableProps> = ({ isEmpty, children }) => {
417418
return (
418-
<TableContainer>
419-
<Table>
420-
<TableHead>
421-
<TableRow>
422-
<TableCell width="45%">IdP organization</TableCell>
423-
<TableCell width="55%">Coder organization</TableCell>
424-
<TableCell width="10%" />
425-
</TableRow>
426-
</TableHead>
427-
<TableBody>
428-
<ChooseOne>
429-
<Cond condition={isEmpty}>
430-
<TableRow>
431-
<TableCell colSpan={999}>
432-
<EmptyState
433-
message={"No organization mappings"}
434-
isCompact
435-
cta={
436-
<Link
437-
href={docs("/admin/users/idp-sync#organization-sync")}
438-
>
439-
How to set up IdP organization sync
440-
</Link>
441-
}
442-
/>
443-
</TableCell>
444-
</TableRow>
445-
</Cond>
419+
<Table>
420+
<TableHeader>
421+
<TableRow>
422+
<TableCell width="45%">IdP organization</TableCell>
423+
<TableCell width="55%">Coder organization</TableCell>
424+
<TableCell width="10%" />
425+
</TableRow>
426+
</TableHeader>
427+
<TableBody>
428+
<ChooseOne>
429+
<Cond condition={isEmpty}>
430+
<TableRow>
431+
<TableCell colSpan={999}>
432+
<EmptyState
433+
message={"No organization mappings"}
434+
isCompact
435+
cta={
436+
<Link
437+
href={docs("/admin/users/idp-sync#organization-sync")}
438+
>
439+
How to set up IdP organization sync
440+
</Link>
441+
}
442+
/>
443+
</TableCell>
444+
</TableRow>
445+
</Cond>
446446

447-
<Cond>{children}</Cond>
448-
</ChooseOne>
449-
</TableBody>
450-
</Table>
451-
</TableContainer>
447+
<Cond>{children}</Cond>
448+
</ChooseOne>
449+
</TableBody>
450+
</Table>
452451
);
453452
};
454453

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy