feat: implement content management dashboard and update proxy configurations to support AI-assisted learning material generation
All checks were successful
On Push to Main / test (push) Successful in 23s
On Push to Main / publish (push) Successful in 50s
On Push to Main / deploy-dev (push) Successful in 1m22s

This commit is contained in:
RaymondVerhoef
2026-05-15 12:53:53 +02:00
parent aaafe413f6
commit 0a73ab3466
8 changed files with 75 additions and 45 deletions

View File

@@ -53,14 +53,14 @@ const Leren = () => {
}
}, [state.currentUser, state.weekNumber]);
const handleOpenTopic = (topic) => {
const handleOpenTopic = async (topic) => {
setActiveTopic(topic);
setView('detail');
setSessionDone(false);
setError(null);
setFeedbackText('');
setFeedbackPrompted(false);
const cached = getCachedContent(topic.id);
const cached = await getCachedContent(topic.id);
if (cached) {
setContent(cached);
} else {

View File

@@ -37,11 +37,14 @@ const Testen = () => {
// ── Check for existing result ──
useEffect(() => {
if (currentUser) {
const existing = getTestResult(currentUser.id, weekNumber);
if (existing) {
setResult(existing);
setPhase('results');
}
const check = async () => {
const existing = await getTestResult(currentUser.id, weekNumber);
if (existing) {
setResult(existing);
setPhase('results');
}
};
check();
}
}, [currentUser, weekNumber]);
@@ -98,7 +101,7 @@ const Testen = () => {
};
// ── Finish quiz & score ──
const finishQuiz = useCallback(() => {
const finishQuiz = useCallback(async () => {
clearInterval(timerRef.current);
if (!quiz) return;
@@ -129,7 +132,7 @@ const Testen = () => {
breakdown,
};
const { pointsEarned } = saveTestResult(currentUser.id, weekNumber, testResult);
const { pointsEarned } = await saveTestResult(currentUser.id, weekNumber, testResult);
testResult.pointsEarned = pointsEarned;
setResult(testResult);
setPhase('results');