refactor(frontend): replace legacy utils JS files with typed TS equivalents

This commit is contained in:
Yiannis
2026-03-11 01:51:53 +02:00
parent df4b0422d5
commit 1b8e8aae6a
48 changed files with 711 additions and 502 deletions

View File

@@ -0,0 +1,11 @@
import urlParse from 'url-parse';
export function formatInnerLink(url: string, baseUrl: string) {
let link = urlParse(url, {});
if ('' === link.origin || 'null' === link.origin || !link.origin) {
link = urlParse(baseUrl + '/' + url.replace(/^\//g, ''), {});
}
return link.toString();
}