Add UUID helper
cgen-9018ebaa09ee4cefb379403079bfe8b6
This commit is contained in:
parent
1e0a0acfdc
commit
d3f8482020
1 changed files with 5 additions and 0 deletions
|
|
@ -41,6 +41,11 @@ const formatDate = (value?: string | null) => {
|
||||||
}).format(date);
|
}).format(date);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const isUuid = (value: string) =>
|
||||||
|
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(
|
||||||
|
value,
|
||||||
|
);
|
||||||
|
|
||||||
const ProfilePassport = () => {
|
const ProfilePassport = () => {
|
||||||
const params = useParams<{ username?: string }>();
|
const params = useParams<{ username?: string }>();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue