[Snow Team] frontend-mobile: auto-commit work
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
export function isMobileHost(hostname = window.location.hostname) {
|
||||
return hostname === 'm.localhost' || hostname.startsWith('m.')
|
||||
}
|
||||
|
||||
export function toMobilePath(path: string) {
|
||||
if (path === '/') {
|
||||
return '/m'
|
||||
}
|
||||
if (path.startsWith('/m') || path.startsWith('/admin')) {
|
||||
return path
|
||||
}
|
||||
return `/m${path}`
|
||||
}
|
||||
Reference in New Issue
Block a user