import { createContext, useState, ReactNode } from 'react'; interface AnvilContextType { uuid: string; setAnvilUuid: (uuid: string) => void; } const AnvilContextDefault: AnvilContextType = { uuid: '', setAnvilUuid: () => null, }; const AnvilContext = createContext(AnvilContextDefault); const AnvilProvider = ({ children }: { children: ReactNode }): JSX.Element => { const [uuid, setUuid] = useState(''); const setAnvilUuid = (anvilUuid: string): void => { setUuid(anvilUuid); }; return ( {children} ); }; export default AnvilProvider; export { AnvilContext };