Skip to content

[BUG] - The type of navigate in HeroUIProvider doesn't match after upgrade Next.js to 15.5 #5643

@Cierra-Runis

Description

@Cierra-Runis

HeroUI Version

@heroui/[email protected]

Describe the bug

After updating Next.js to 15.5, because the new feature Typed Routes, the type of HeroUIProvider.navigate doesn't match anymore.

Temporary fix:

'use client';

import { HeroUIProvider } from '@heroui/system';
import { useRouter } from 'next/navigation';
...

export function Providers({ children }) {
  const router = useRouter();

  return (
-   <HeroUIProvider navigate={router.push}>
+   <HeroUIProvider
+     navigate={(path, options) => router.push(path as never, options)}
+   >
      {children}
    </HeroUIProvider>
  );
}

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

As above.

Expected behavior

No change to use.

Screenshots or Videos

No response

Operating System Version

Windows 11 24H2 (26100.4946)

Browser

Edge

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions