1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 14:59:41 +02:00

refactor(settings): move app settings to panel [EE-5503] (#9043)

This commit is contained in:
Chaim Lev-Ari 2023-06-07 12:16:47 +07:00 committed by GitHub
parent 4f04fe54a7
commit c7756f3018
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 477 additions and 201 deletions

View file

@ -0,0 +1,15 @@
export function isValidUrl(
value: string | undefined,
additionalCheck: (url: URL) => boolean = () => true
) {
if (!value) {
return false;
}
try {
const url = new URL(value);
return additionalCheck(url);
} catch {
return false;
}
}