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'
import React, { useContext } from 'react';
import React, { ReactNode, useContext } from 'react';
import { createContext } from 'react';
import { personalData } from '../../PersonalData';
import { PersonalData } from '../../PersonalDataTypes';
export const PersonContext = createContext(personalData);
export function PersonProvider({ children }) {
export function PersonProvider(props: { children: ReactNode }) {
return (
<PersonContext.Provider value={personalData}>
{children}
{props.children}
</PersonContext.Provider>
)
}