Files
hackathon/front_end/src/context/LocalDataContext.tsx
2026-01-06 10:05:57 +01:00

15 lines
450 B
TypeScript

import { createContext } from 'react'
import { Session, User } from '../classes';
interface LocalDataContextType {
user:User;
setUser: React.Dispatch<React.SetStateAction<User>>
sessions: Session[];
setSessions: React.Dispatch<React.SetStateAction<Session[]>>
users: User[];
setUsers: React.Dispatch<React.SetStateAction<User[]>>
}
export const LocalDataContext = createContext<LocalDataContextType | undefined>(undefined)