Skip to content

Commit

Permalink
fix(ui-react-utils): remove defaultProps from DeterministicContextPro…
Browse files Browse the repository at this point in the history
…vider
  • Loading branch information
balzss authored and HerrTopi committed Jun 13, 2024
1 parent 7d6d3ad commit 5c89612
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import {

type DeterministicIdProviderValue = Map<string, number>
type DeterministicIdProviderProps = React.PropsWithChildren<{
// eslint-disable-next-line react/require-default-props
instanceCounterMap?: DeterministicIdProviderValue
}>

Expand All @@ -47,17 +48,14 @@ type DeterministicIdProviderProps = React.PropsWithChildren<{

const DeterministicIdContextProvider = ({
children,
instanceCounterMap
instanceCounterMap = defaultDeterministicIDMap
}: DeterministicIdProviderProps) => {
return (
<DeterministicIdContext.Provider value={instanceCounterMap!}>
{children}
</DeterministicIdContext.Provider>
)
}
DeterministicIdContextProvider.defaultProps = {
instanceCounterMap: defaultDeterministicIDMap
}

export { DeterministicIdContextProvider }

Expand Down

0 comments on commit 5c89612

Please sign in to comment.