Fix PersonContext typing
This commit is contained in:
parent
7dd0e13cd6
commit
b810ea1151
@ -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>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user