Skip to content

Commit

Permalink
feat(frontend): displaying all played songs from an inactive room usi…
Browse files Browse the repository at this point in the history
…ng new InactiveRoom component
  • Loading branch information
MAXOUXAX committed Jan 24, 2024
1 parent 25ae6e2 commit 3f94301
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion expo/components/RoomHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { useEffect, useState } from "react";
import { StyleSheet } from "react-native";

import InfoCard from "./InfoCard";
import InactiveMusic from "./Music";
import { Text, View } from "./Tamed";
import H2 from "./text/H2";
import { getApiUrl } from "../lib/apiUrl";
import useSupabaseUser from "../lib/useSupabaseUser";

Expand Down Expand Up @@ -83,7 +85,14 @@ const RoomHistory: React.FC<RoomHistoryProps> = ({ roomId }) => {
title="Participants"
/>
</View>
<Text>{processedRoom.name}</Text>
<View>
<H2>
Historique des musiques ({processedRoom.playedSongs.length + ""})
</H2>
{processedRoom.playedSongs.map((song) => {
return <InactiveMusic key={song.name} music={song} />;
})}
</View>
</>
)}
{!processedRoom && !error && <Text>Chargement...</Text>}
Expand Down

0 comments on commit 3f94301

Please sign in to comment.