mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-15 15:37:33 +08:00
redirect to different pages based on user's device
This commit is contained in:
@@ -8,3 +8,11 @@ export function getBasePath(): string {
|
||||
|
||||
return path.substring(0, lastSlashIndex);
|
||||
}
|
||||
|
||||
export function navigateToHomePage(type: 'desktop' | 'mobile'): void {
|
||||
if (__EZBOOKKEEPING_IS_PRODUCTION__) {
|
||||
window.location.replace(`${type}#/`);
|
||||
} else {
|
||||
window.location.replace(`${type}.html#/`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user