refactor(ui): clean code

This commit is contained in:
Fu Diwei
2024-12-09 17:48:44 +08:00
parent 588e89e8fe
commit 07a443f6c4
19 changed files with 57 additions and 88 deletions

8
ui/src/utils/url.ts Normal file
View File

@@ -0,0 +1,8 @@
export function isValidURL(url: string): boolean {
try {
new URL(url);
return true;
} catch (error) {
return false;
}
}