Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #167 from navikt/react-18
Browse files Browse the repository at this point in the history
Støtt React 18. Release 6.4.0
  • Loading branch information
kenglxn authored Sep 18, 2023
2 parents 87f5971 + 622b777 commit c214409
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
32 changes: 16 additions & 16 deletions component/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"typescript": "^4.8.4"
},
"peerDependencies": {
"react": "17",
"react-dom": "17",
"react": "17 || 18",
"react-dom": "17 || 18",
"@navikt/ds-css": ">=2",
"@navikt/ds-icons": ">=2",
"@navikt/ds-react": ">=2"
Expand Down
5 changes: 3 additions & 2 deletions component/src/utils/amplitude.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import amplitude, {AmplitudeClient} from 'amplitude-js'
import {Notifikasjon} from '../api/graphql-types'
import React, {createContext, FC, useContext, useMemo} from "react";
import React, {createContext, ReactNode, useContext, useMemo} from "react";
import {Miljø} from "../index";

const createAmpltiudeInstance = (apiKey: string) => {
Expand Down Expand Up @@ -79,9 +79,10 @@ const AmplitudeContext = createContext(createAmplitudeLogger(stubbedAmplitudeCli

type Props = {
miljo: Miljø,
children: ReactNode,
}

export const AmplitudeProvider: FC<Props> = ({miljo, children}) => {
export const AmplitudeProvider = ({miljo, children}: Props) => {
const client = useAmplitudeClient(miljo)
const logger = createAmplitudeLogger(client)
return <AmplitudeContext.Provider value={logger}>
Expand Down

0 comments on commit c214409

Please sign in to comment.