Skip to content

Commit

Permalink
fix: fixed types
Browse files Browse the repository at this point in the history
  • Loading branch information
BowlingX committed Jun 13, 2023
1 parent a855a80 commit f2fd178
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/lib/adapters/nextjs-app-router/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@

import { useSearchParams, useRouter, usePathname } from 'next/navigation.js'
import { HistoryManagement, StoreContext, useGeschichte } from '../../store.js'
import React, { memo, useEffect, useMemo, useRef } from 'react'
import React, { memo, ReactNode, useEffect, useMemo, useRef } from 'react'
import { StoreState } from '../../middleware.js'
import { shallow } from 'zustand/shallow'
import { createSearch } from '../../utils.js'

const GeschichteForNextAppRouter = ({
children,
}: React.PropsWithChildren<never>) => {
interface Props {
readonly children?: ReactNode
}

const GeschichteForNextAppRouter = ({ children }: Props) => {
const searchParams = useSearchParams()
const { push, replace } = useRouter()
const pathname = usePathname()
Expand All @@ -28,7 +30,7 @@ const GeschichteForNextAppRouter = ({
},
replace: async (query) => {
replace(`${pathname}${createSearch(query)}`)
},
}
}
}, [])

Expand All @@ -41,7 +43,7 @@ const GeschichteForNextAppRouter = ({
// tslint:disable-next-line:no-shadowed-variable
({ unregister, updateFromQuery }: StoreState<object>) => ({
unregister,
updateFromQuery,
updateFromQuery
}),
shallow
)
Expand Down

0 comments on commit f2fd178

Please sign in to comment.