aboutsummaryrefslogtreecommitdiff
path: root/src/ViewContext.tsx
diff options
context:
space:
mode:
authorMax Nanis2025-05-28 04:41:37 +0100
committerMax Nanis2025-05-28 04:41:37 +0100
commit8caa77413ea372e5cbd2980a9922d701af359c04 (patch)
tree9341e2f70fab6b2678fdff53c002954ef69c7b3e /src/ViewContext.tsx
downloadpanel-ui-8caa77413ea372e5cbd2980a9922d701af359c04.tar.gz
panel-ui-8caa77413ea372e5cbd2980a9922d701af359c04.zip
initial commit
Diffstat (limited to 'src/ViewContext.tsx')
-rw-r--r--src/ViewContext.tsx43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/ViewContext.tsx b/src/ViewContext.tsx
new file mode 100644
index 0000000..7946052
--- /dev/null
+++ b/src/ViewContext.tsx
@@ -0,0 +1,43 @@
+// import { createContext, useContext, useState, ReactNode } from 'react';
+// import {ProfilingQuestion} from "@/models/question.ts"
+//
+// type View = 'offerwall' | 'questions' | 'cashout';
+//
+// type ViewContextType = {
+// activeView: View;
+// setActiveView: (view: View) => void;
+// };
+//
+// type ProfilingQuestionMap = Map<string, ProfilingQuestion>;
+//
+// interface ProfilingQuestionsContextType {
+// answers: ProfilingQuestionMap;
+// setAnswer: (questionId: string, values: string[]) => void;
+// clearAnswers: () => void;
+// }
+//
+// interface ProfilingQuestionsContextType {
+// questions: ProfilingQuestion[];
+// setQuestions: (questions: ProfilingQuestion[]) => void;
+// getQuestionById: (id: string) => ProfilingQuestion | undefined;
+// }
+//
+// const ViewContext = createContext<ViewContextType | undefined>(undefined);
+//
+// export function useViewContext() {
+// const context = useContext(ViewContext);
+// if (!context) {
+// throw new Error('useViewContext must be used within a ViewProvider');
+// }
+// return context;
+// }
+//
+// export function ViewProvider({ children }: { children: ReactNode }) {
+// const [activeView, setActiveView] = useState<View>('offerwall');
+//
+// return (
+// <ViewContext.Provider value={{ activeView, setActiveView }}>
+// {children}
+// </ViewContext.Provider>
+// );
+// } \ No newline at end of file