Skip to content

Commit 0cc7184

Browse files
committed
fix: hydrate permissions on dashboard, fix active menu item logic
1 parent e905675 commit 0cc7184

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/next/src/elements/Nav/index.client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export const DefaultNavClient: React.FC = () => {
8686
LinkWithDefault) as typeof LinkWithDefault.default
8787

8888
const LinkElement = Link || 'a'
89-
const activeCollection = pathname.startsWith(href)
89+
const activeCollection = pathname.endsWith(href)
9090

9191
return (
9292
<LinkElement

packages/next/src/views/Dashboard/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export const Dashboard: React.FC<AdminViewProps> = ({ initPageResult, params, se
7979

8080
return (
8181
<Fragment>
82+
<HydrateAuthProvider permissions={permissions} />
8283
<RenderCustomComponent
8384
CustomComponent={
8485
typeof CustomDashboardComponent === 'function' ? CustomDashboardComponent : undefined

0 commit comments

Comments
 (0)