Skip to content

Commit

Permalink
setup nextui navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
mauriciabad committed Nov 12, 2023
1 parent 2cbe1c9 commit 4700332
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/providers/nextui-provider.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
'use client'

import { NextUIProvider, NextUIProviderProps } from '@nextui-org/react'
import { useRouter } from 'next-intl/client'
import type { FC, PropsWithChildren } from 'react'

export const NextuiProvider: FC<PropsWithChildren<NextUIProviderProps>> = ({
children,
...props
}) => {
return <NextUIProvider {...props}>{children}</NextUIProvider>
const router = useRouter()

return (
<NextUIProvider navigate={router.push} {...props}>
{children}
</NextUIProvider>
)
}

0 comments on commit 4700332

Please sign in to comment.