File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
DeploymentSettingsPage/IdpOrgSyncPage
ManagementSettingsPage/IdpSyncPage Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 7
7
} from "components/Popover/Popover" ;
8
8
import type { FC } from "react" ;
9
9
import { cn } from "utils/cn" ;
10
- import { UUID } from "utils/uuid" ;
10
+ import { isUUID } from "utils/uuid" ;
11
11
12
12
interface OrganizationPillsProps {
13
13
organizations : readonly string [ ] ;
@@ -18,7 +18,7 @@ export const OrganizationPills: FC<OrganizationPillsProps> = ({
18
18
} ) => {
19
19
const orgs = organizations . map ( ( org ) => ( {
20
20
name : org ,
21
- isUUID : UUID . test ( org ) ,
21
+ isUUID : isUUID ( org ) ,
22
22
} ) ) ;
23
23
24
24
return (
Original file line number Diff line number Diff line change 7
7
PopoverTrigger ,
8
8
} from "components/Popover/Popover" ;
9
9
import type { FC } from "react" ;
10
- import { UUID } from "utils/uuid" ;
10
+ import { isUUID } from "utils/uuid" ;
11
11
12
12
interface PillListProps {
13
13
roles : readonly string [ ] ;
@@ -17,7 +17,7 @@ export const IdpPillList: FC<PillListProps> = ({ roles }) => {
17
17
return (
18
18
< Stack direction = "row" spacing = { 1 } >
19
19
{ roles . length > 0 ? (
20
- < Pill css = { UUID . test ( roles [ 0 ] ) ? styles . errorPill : styles . pill } >
20
+ < Pill css = { isUUID ( roles [ 0 ] ) ? styles . errorPill : styles . pill } >
21
21
{ roles [ 0 ] }
22
22
</ Pill >
23
23
) : (
@@ -77,7 +77,7 @@ const OverflowPill: FC<OverflowPillProps> = ({ roles }) => {
77
77
{ roles . map ( ( role ) => (
78
78
< Pill
79
79
key = { role }
80
- css = { UUID . test ( role ) ? styles . errorPill : styles . pill }
80
+ css = { isUUID ( role ) ? styles . errorPill : styles . pill }
81
81
>
82
82
{ role }
83
83
</ Pill >
Original file line number Diff line number Diff line change 1
- export const UUID =
2
- / ^ [ 0 - 9 a - f ] { 8 } - [ 0 - 9 a - f ] { 4 } - [ 0 - 5 ] [ 0 - 9 a - f ] { 3 } - [ 8 9 a b ] [ 0 - 9 a - f ] { 3 } - [ 0 - 9 a - f ] { 12 } $ / i;
1
+ export const isUUID = ( text :string ) => {
2
+ const UUID = / ^ [ 0 - 9 a - f ] { 8 } - [ 0 - 9 a - f ] { 4 } - [ 0 - 5 ] [ 0 - 9 a - f ] { 3 } - [ 8 9 a b ] [ 0 - 9 a - f ] { 3 } - [ 0 - 9 a - f ] { 12 } $ / i;
3
+ return UUID . test ( text ) ;
4
+ }
5
+
You can’t perform that action at this time.
0 commit comments