+
+
+ Grades
+
+ Onboarding
+
+
+
+
+
+ {selectedTemplate && (
+
+
+ Advanced Settings
+
+ Hit Save to apply your changes and
+ complete the onboarding.
+
You can change this in the settings at any time.
+
+
+
+
+
+
+ )}
+
+
+
+ );
+}
diff --git a/components/preferences-provider.tsx b/components/preferences-provider.tsx
index 4b3c346..0b7685e 100644
--- a/components/preferences-provider.tsx
+++ b/components/preferences-provider.tsx
@@ -6,30 +6,41 @@ import { getDefaultPreferences } from "@/lib/utils";
import { useSession } from "next-auth/react";
import { createContext, useContext, useEffect, useState } from "react";
-
type PreferencesContextType = {
preferences: Preferences | undefined;
setPreferences: (preferences: Preferences) => void;
+ isDefault: boolean;
+ setIsDefault: (isDefault: boolean) => void;
loading: boolean;
};
const defaultContextValue: PreferencesContextType = {
preferences: undefined,
setPreferences: () => void 0,
+ isDefault: false,
+ setIsDefault: () => void 0,
loading: true,
};
const PreferencesContext = createContext(defaultContextValue);
-export function PreferencesProvider({ children }: { children: React.ReactNode }) {
- const [preferences, setPreferences] = useState