Refactor BaseUrl string conversion

We're only using this as a string, so no need to convert it to an URL.
This commit is contained in:
Rūdolfs Ošiņš
2024-02-23 15:46:28 +00:00
parent 8f43a57984
commit 41435951c1
8 changed files with 21 additions and 24 deletions
+2 -2
View File
@@ -94,8 +94,8 @@ export function formatEditedCaption(
} edited ${absoluteTimestamp(timestamp)}`;
}
export function baseUrlToUrl(baseUrl: BaseUrl): URL {
return new URL(`${baseUrl.scheme}://${baseUrl.hostname}:${baseUrl.port}`);
export function baseUrlToString(baseUrl: BaseUrl): string {
return `${baseUrl.scheme}://${baseUrl.hostname}:${baseUrl.port}`;
}
// Generates a publicly shareable link.