refactor new file download functions to new file

This commit is contained in:
spencerwooo
2021-12-17 21:21:25 +08:00
parent 9c5a6e6211
commit 93376e071e
13 changed files with 247 additions and 223 deletions
+10
View File
@@ -0,0 +1,10 @@
/**
* Extract the current web page's base url
* @returns base url of the page
*/
export function getBaseUrl(): string {
if (typeof window !== 'undefined') {
return window.location.origin
}
return ''
}