Fix PersonContext typing

This commit is contained in:
Dejvino 2023-05-27 05:29:50 +02:00
parent 7dd0e13cd6
commit b810ea1151

View File

@ -1,15 +1,15 @@
'use client' 'use client'
import React, { useContext } from 'react'; import React, { ReactNode, useContext } from 'react';
import { createContext } from 'react'; import { createContext } from 'react';
import { personalData } from '../../PersonalData'; import { personalData } from '../../PersonalData';
import { PersonalData } from '../../PersonalDataTypes'; import { PersonalData } from '../../PersonalDataTypes';
export const PersonContext = createContext(personalData); export const PersonContext = createContext(personalData);
export function PersonProvider({ children }) { export function PersonProvider(props: { children: ReactNode }) {
return ( return (
<PersonContext.Provider value={personalData}> <PersonContext.Provider value={personalData}>
{children} {props.children}
</PersonContext.Provider> </PersonContext.Provider>
) )
} }