chore: add all the code from original repo

This commit is contained in:
Riccardo
2024-05-23 16:55:29 +02:00
parent d8f9a215eb
commit 85d66215a7
66 changed files with 16668 additions and 122 deletions

View File

@@ -0,0 +1,11 @@
import { createContext } from 'react';
interface ProfileContextProps {
profile: string | undefined;
setProfile: (profile: string | undefined) => void;
}
export const ProfileContext = createContext<ProfileContextProps>({
profile: undefined,
setProfile: () => {}
});

View 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>
);
}