Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions apps/frontend/src/screens/LiveQuiz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
const [connectionState, setConnectionState] =
useState<'connected' | 'reconnecting' | 'failed'>('connected');
const [gameState, setGameState] = useState<GameState>('WAITING');
const [participants, setParticipants] = useState<any[]>([]);

Check failure on line 44 in apps/frontend/src/screens/LiveQuiz.tsx

View workflow job for this annotation

GitHub Actions / Lint & type-check

Unexpected any. Specify a different type
const [currentQuestion, setCurrentQuestion] = useState<any>(null);

Check failure on line 45 in apps/frontend/src/screens/LiveQuiz.tsx

View workflow job for this annotation

GitHub Actions / Lint & type-check

Unexpected any. Specify a different type
const [timeLeft, setTimeLeft] = useState(0);
const [correctAnswers, setCorrectAnswers] = useState<string[]>([]);
const [leaderboard, setLeaderboard] = useState<any[]>([]);

Check failure on line 48 in apps/frontend/src/screens/LiveQuiz.tsx

View workflow job for this annotation

GitHub Actions / Lint & type-check

Unexpected any. Specify a different type

const [joinCode, setJoinCode] = useState('');

Expand All @@ -62,7 +62,7 @@
{ rank: 1, player: sortedLeaderboard[0] },
{ rank: 2, player: sortedLeaderboard[1] },
{ rank: 3, player: sortedLeaderboard[2] },
].filter((entry): entry is { rank: number; player: any } => Boolean(entry.player));

Check failure on line 65 in apps/frontend/src/screens/LiveQuiz.tsx

View workflow job for this annotation

GitHub Actions / Lint & type-check

Unexpected any. Specify a different type

const others = sortedLeaderboard.slice(3);

Expand Down Expand Up @@ -238,7 +238,7 @@
}
};

}, [sessionId, isOrganizer]);

Check warning on line 241 in apps/frontend/src/screens/LiveQuiz.tsx

View workflow job for this annotation

GitHub Actions / Lint & type-check

React Hook useEffect has missing dependencies: 'navigate', 'participantId', and 'user?.id'. Either include them or remove the dependency array


const handleStart = () => {
Expand Down Expand Up @@ -681,8 +681,12 @@

</div>

<Link to={isOrganizer ? "/dashboard" : "/"} className="mt-16 px-8 py-3 text-black font-bold font-secondary tracking-wide rounded-full bg-linear-to-b from-pink-500 to-pink-800/40 hover:to-pink-800/30 transition duration-200 shadow-sm active:shadow-none active:scale-95 shadow-pink-700">
{isOrganizer ? "Back to Dashboard" : "Play Again"}
<Link
to={isOrganizer ? "/dashboard" : "/join"}
state={isOrganizer ? undefined : { username }}
className="mt-16 px-8 py-3 text-black font-bold font-secondary tracking-wide rounded-full bg-linear-to-b from-pink-500 to-pink-800/40 hover:to-pink-800/30 transition duration-200 shadow-sm active:shadow-none active:scale-95 shadow-pink-700"
>
{isOrganizer ? "Back to Dashboard" : "Join Another Quiz"}
</Link>
</div>
</div>
Expand Down
Loading