import { createContext, useContext } from "react";


export const QuizIdContext = createContext<string | null>(null);

export const useQuizId = () => {
    const quizId = useContext(QuizIdContext);
    if (quizId === null) throw new Error("quizId context is null");

    return quizId;
};
