Skip to content
Snippets Groups Projects

Feature/138 refacto plaing quiz sse

Merged GOEPP THOMAS requested to merge feature/138-refacto-plaing-quiz-sse into develop
Compare and
13 files
+ 298
83
Preferences
Compare changes
Files
13
import React from "react";
import { FlatList, View, Text, StyleSheet, Image } from "react-native";
import {User} from "../../../models/User";
import {UserEndQuiz} from "../../../models/UserEndQuiz";
interface Props {
users: User[];
users: UserEndQuiz[];
maxScore: number;
}
export default function EndQuizListPlayer({ users, maxScore }: Props) {
const renderUser = ({ item, index }: { item: User; index: number }) => (
const renderUser = ({ item, index }: { item: UserEndQuiz; index: number }) => (
<View style={[styles.userContainer, index === 0 && styles.firstPlace]}>
<Image
source={require("../../../assets/ProfilBaseImage.png")} // Replace with actual profile picture if available
@@ -19,7 +20,7 @@ export default function EndQuizListPlayer({ users, maxScore }: Props) {
{item.username.toUpperCase()}
</Text>
<Text style={styles.score}>
{10 + index}/{maxScore} {/* Adjust score logic as needed */}
{item.score}/{maxScore} {/* Adjust score logic as needed */}
</Text>
</View>
</View>