fix: Resolve Server Component serialization error on shared links
All checks were successful
Automated Container Build / build-and-push (push) Successful in 51s

This commit is contained in:
Elijah 2026-06-27 20:39:54 -07:00
parent cab4757be2
commit a65e371449
3 changed files with 10 additions and 13 deletions

View file

@ -87,11 +87,6 @@ export default async function SharedPage(props: SharedPageProps) {
}}
retakeIds={null}
isShared={true}
onFinished={() => {
// In shared mode, finishes local results display, when closed we can reload
// but QuizViewer doesn't handle the restart well in shared mode if we just close.
// We'll let it stay on results or the user can refresh.
}}
/>
)}
</div>

View file

@ -9,7 +9,7 @@ interface QuizResultsProps {
quiz: any; // QuizData
attempt: any; // QuizAttempt
onRetake: (missedIds: string[]) => void;
onClose: () => void;
onClose?: () => void;
}
export function QuizResults({ quiz, attempt, onRetake, onClose }: QuizResultsProps) {
@ -72,12 +72,14 @@ export function QuizResults({ quiz, attempt, onRetake, onClose }: QuizResultsPro
</div>
<div className="flex justify-center gap-4">
<button
onClick={onClose}
className="px-6 py-2.5 rounded-lg border border-border text-text-heading font-medium hover:bg-bg-surface-alt transition-all duration-200 cursor-pointer"
>
Back to Quizzes
</button>
{onClose && (
<button
onClick={onClose}
className="px-6 py-2.5 rounded-lg border border-border text-text-heading font-medium hover:bg-bg-surface-alt transition-all duration-200 cursor-pointer"
>
Back to Quizzes
</button>
)}
{missedIds.length > 0 && (
<button

View file

@ -35,7 +35,7 @@ interface QuizViewerProps {
};
retakeIds: string[] | null;
isShared?: boolean;
onFinished: () => void;
onFinished?: () => void;
}
export function QuizViewer({ quiz, retakeIds, isShared = false, onFinished }: QuizViewerProps) {