fix(layout): fix common
This commit is contained in:
@@ -40,11 +40,14 @@ export function PathnameRecorder({ menu }: ComponentProps) {
|
||||
|
||||
const { updateMenuDefaultRouter } = useAppLayoutStore()
|
||||
useEffect(() => {
|
||||
let key = process.env.NEXT_PUBLIC_BASE_PATH
|
||||
? process.env.NEXT_PUBLIC_BASE_PATH
|
||||
: `/${sideNavMenu?.url}`
|
||||
pathname.startsWith(`/${sideNavMenu?.url}`) &&
|
||||
sideNavMenu?.url &&
|
||||
`/${sideNavMenu?.url}` !== pathname &&
|
||||
updateMenuDefaultRouter(
|
||||
`/${sideNavMenu?.url}`,
|
||||
key,
|
||||
queryString
|
||||
? `${process.env.NEXT_PUBLIC_BASE_PATH}${pathname}?${queryString}`
|
||||
: `${process.env.NEXT_PUBLIC_BASE_PATH}${pathname}`
|
||||
|
||||
Reference in New Issue
Block a user