'use client'
import React, { useContext } from 'react';
import { createContext } from 'react';
import { personalData } from '../../PersonalData';
import { PersonalData } from '../../PersonalDataTypes';

export const PersonContext = createContext(personalData);

export function PersonProvider({ children }) {
    return (
        <PersonContext.Provider value={personalData}>
            {children}
        </PersonContext.Provider>
    )
}

export const usePersonContext = (): PersonalData => useContext(PersonContext)
