fix aside expanded when load page

This commit is contained in:
Dede Fuji Abdul
2023-10-19 10:11:59 +07:00
parent 2e4efd74fa
commit 678f25f3a9
5 changed files with 38 additions and 5 deletions

0
src/utils/numbers.ts Normal file
View File

17
src/utils/texts.ts Normal file
View 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
}