Fix sharing
This commit is contained in:
parent
1bfe7e3437
commit
3e9a988748
6 changed files with 88 additions and 13 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useState, useEffect } from 'react';
|
||||
import { useParams, useNavigate } from 'react-router-dom';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useAuth } from 'react-oidc-context';
|
||||
import { motion } from 'framer-motion';
|
||||
import { BrainCircuit, Play, Loader2, BookmarkPlus, ChevronDown, ChevronUp, AlertCircle, LogIn } from 'lucide-react';
|
||||
|
|
@ -20,10 +20,11 @@ interface SharedQuizData {
|
|||
|
||||
interface SharedQuizViewProps {
|
||||
onHostQuiz: (quiz: Quiz) => void;
|
||||
shareToken: string;
|
||||
}
|
||||
|
||||
export const SharedQuizView: React.FC<SharedQuizViewProps> = ({ onHostQuiz }) => {
|
||||
const { token } = useParams<{ token: string }>();
|
||||
export const SharedQuizView: React.FC<SharedQuizViewProps> = ({ onHostQuiz, shareToken }) => {
|
||||
const token = shareToken;
|
||||
const navigate = useNavigate();
|
||||
const auth = useAuth();
|
||||
const { authFetch } = useAuthenticatedFetch();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue