Skip to content

Commit 16665e2

Browse files
committed
chore: use Link component
1 parent 50c12db commit 16665e2

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import {
66
import { ChooseOne, Cond } from "components/Conditionals/ChooseOne";
77
import { displayError } from "components/GlobalSnackbar/utils";
88
import { displaySuccess } from "components/GlobalSnackbar/utils";
9+
import { Link } from "components/Link/Link";
910
import { Loader } from "components/Loader/Loader";
1011
import { Paywall } from "components/Paywall/Paywall";
11-
import { SquareArrowOutUpRight } from "lucide-react";
1212
import { useDashboard } from "modules/dashboard/useDashboard";
1313
import { useFeatureVisibility } from "modules/dashboard/useFeatureVisibility";
1414
import { type FC, useEffect } from "react";
@@ -62,13 +62,9 @@ export const IdpOrgSyncPage: FC = () => {
6262
<p className="flex flex-row gap-1 text-sm text-content-secondary font-medium m-0">
6363
Automatically assign users to an organization based on their IdP
6464
claims.
65-
<a
66-
href={docs("/admin/users/idp-sync")}
67-
className="flex flex-row text-content-link items-center gap-1 no-underline hover:underline visited:text-content-link"
68-
>
65+
<Link href={docs("/admin/users/idp-sync#organization-sync")}>
6966
View docs
70-
<SquareArrowOutUpRight size={14} />
71-
</a>
67+
</Link>
7268
</p>
7369
</div>
7470
<ExportPolicyButton syncSettings={orgSyncSettingsData} />

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

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ import {
2828
} from "components/HelpTooltip/HelpTooltip";
2929
import { Input } from "components/Input/Input";
3030
import { Label } from "components/Label/Label";
31+
import { Link } from "components/Link/Link";
3132
import {
3233
MultiSelectCombobox,
3334
type Option,
3435
} from "components/MultiSelectCombobox/MultiSelectCombobox";
3536
import { Spinner } from "components/Spinner/Spinner";
3637
import { Switch } from "components/Switch/Switch";
3738
import { useFormik } from "formik";
38-
import { Plus, SquareArrowOutUpRight, Trash } from "lucide-react";
39+
import { Plus, Trash } from "lucide-react";
3940
import { type FC, useId, useState } from "react";
4041
import { docs } from "utils/docs";
4142
import * as Yup from "yup";
@@ -207,6 +208,7 @@ export const IdpOrgSyncPageView: FC<IdpSyncPageViewProps> = ({
207208
<div />
208209
<Button
209210
type="submit"
211+
className="min-w-fit"
210212
disabled={!idpOrgName || coderOrgs.length === 0}
211213
onClick={async () => {
212214
const newSyncSettings = {
@@ -307,15 +309,11 @@ const IdpMappingTable: FC<IdpMappingTableProps> = ({ isEmpty, children }) => {
307309
message={"No organization mappings"}
308310
isCompact
309311
cta={
310-
<Button variant="outline" asChild>
311-
<a
312-
href={docs("/admin/users/idp-sync")}
313-
className="no-underline"
314-
>
315-
<SquareArrowOutUpRight size={14} />
316-
How to set up IdP organization sync
317-
</a>
318-
</Button>
312+
<Link
313+
href={docs("/admin/users/idp-sync#organization-sync")}
314+
>
315+
How to set up IdP organization sync
316+
</Link>
319317
}
320318
/>
321319
</TableCell>

site/src/pages/ManagementSettingsPage/IdpSyncPage/IdpGroupSyncForm.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ export const IdpGroupSyncForm = ({
210210
<div />
211211
<Button
212212
type="submit"
213+
className="min-w-fit"
213214
disabled={!idpGroupName || coderGroups.length === 0}
214215
onClick={() => {
215216
const newSyncSettings = {

site/src/pages/ManagementSettingsPage/IdpSyncPage/IdpMappingTable.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ export const IdpMappingTable: FC<IdpMappingTableProps> = ({
4343
message={`No ${type.toLocaleLowerCase()} mappings`}
4444
isCompact
4545
cta={
46-
<Link href={docs("/admin/users/idp-sync")}>
46+
<Link
47+
href={docs(
48+
`/admin/users/idp-sync#${type.toLocaleLowerCase()}-sync`,
49+
)}
50+
>
4751
How to setup IdP {type.toLocaleLowerCase()} sync
4852
</Link>
4953
}

site/src/pages/ManagementSettingsPage/IdpSyncPage/IdpRoleSyncForm.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ export const IdpRoleSyncForm = ({
155155
<div />
156156
<Button
157157
type="submit"
158+
className="min-w-fit"
158159
disabled={!idpRoleName || coderRoles.length === 0}
159160
onClick={() => {
160161
const newSyncSettings = {

0 commit comments

Comments
 (0)