Fix react 18 changes

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2022-04-09 23:16:06 +02:00
parent 833a5d35a4
commit 931302cbec
20 changed files with 47 additions and 22 deletions

View file

@ -5,6 +5,7 @@
*/
import Link from 'next/link'
import type { PropsWithChildren } from 'react'
import React, { useMemo } from 'react'
import { Nav } from 'react-bootstrap'
import type { PropsWithDataCypressId } from '../../../../utils/cypress-attribute'
@ -23,7 +24,7 @@ export interface HeaderNavLinkProps extends PropsWithDataCypressId {
* @param children The react elements inside of link for more description
* @param props Other navigation item props
*/
export const HeaderNavLink: React.FC<HeaderNavLinkProps> = ({ to, children, ...props }) => {
export const HeaderNavLink: React.FC<PropsWithChildren<HeaderNavLinkProps>> = ({ to, children, ...props }) => {
const { route } = useRouter()
const activeClass = useMemo(() => {