chore: add all the code from original repo
This commit is contained in:
16
contexts/ProfileContextProvider.tsx
Normal file
16
contexts/ProfileContextProvider.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user