17 lines
379 B
TypeScript
17 lines
379 B
TypeScript
import { useState } from 'react';
|
|
import { ProfileContext } from './ProfileContext';
|
|
|
|
export function ProfileContextProvider({
|
|
children
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
const [profile, setProfile] = useState<string | undefined>(undefined);
|
|
|
|
return (
|
|
<ProfileContext.Provider value={{ profile, setProfile }}>
|
|
{children}
|
|
</ProfileContext.Provider>
|
|
);
|
|
}
|