use kobalte dialog for modal instead

This commit is contained in:
Paul Miller
2023-04-10 10:29:08 -05:00
parent 8c6deb171d
commit c93e0e8332
6 changed files with 192 additions and 104 deletions

13
src/utils/getHostname.ts Normal file
View File

@@ -0,0 +1,13 @@
export default function getHostname(url: string): string {
// Check if the URL begins with "ws://" or "wss://"
if (url.startsWith("ws://")) {
// If it does, remove "ws://" from the URL
url = url.slice(5);
} else if (url.startsWith("wss://")) {
// If it begins with "wss://", remove "wss://" from the URL
url = url.slice(6);
}
// Return the resulting URL
return url;
}