fix aside expanded when load page
This commit is contained in:
0
src/utils/numbers.ts
Normal file
0
src/utils/numbers.ts
Normal file
17
src/utils/texts.ts
Normal file
17
src/utils/texts.ts
Normal file
@ -0,0 +1,17 @@
|
||||
const splitRoutePath = (routePath: string): string[] => {
|
||||
const routeParts = routePath.split('/').filter((part) => part !== '')
|
||||
|
||||
const routeArray: string[] = []
|
||||
let currentRoute = ''
|
||||
|
||||
for (const part of routeParts) {
|
||||
currentRoute += `/${part}`
|
||||
routeArray.push(currentRoute)
|
||||
}
|
||||
|
||||
return routeArray
|
||||
}
|
||||
|
||||
export {
|
||||
splitRoutePath
|
||||
}
|
Reference in New Issue
Block a user