diff --git a/front/views/ScoreView.tsx b/front/views/ScoreView.tsx
index b8c671d..a0e51ce 100644
--- a/front/views/ScoreView.tsx
+++ b/front/views/ScoreView.tsx
@@ -1,9 +1,12 @@
-import { Box, Button, Card, Column, Image, Progress, Row, Text, View, useTheme } from "native-base"
+import { Card, Column, Image, Row, Text, useTheme, ScrollView, Center, VStack } from "native-base"
import Translate from "../components/Translate";
import SongCardGrid from "../components/SongCardGrid";
import { useNavigation } from "@react-navigation/native";
import { CardBorderRadius } from "../components/Card";
import TextButton from "../components/TextButton";
+import API from '../API';
+import { useQuery } from "react-query";
+import LoadingComponent from "../components/Loading";
const ScoreView = (/*{ songId }, { songId: number }*/) => {
const theme = useTheme();
@@ -11,63 +14,72 @@ const ScoreView = (/*{ songId }, { songId: number }*/) => {
// const songQuery = useQuery(['song', props.songId], () => API.getSong(props.songId));
// const songScoreQuery = useQuery(['song', props.songId, 'score', 'latest'], () => API.getLastSongPerformanceScore(props.songId));
// const perfoamnceRecommandationsQuery = useQuery(['song', props.songId, 'score', 'latest', 'recommendations'], () => API.getLastSongPerformanceScore(props.songId));
- return
- Rolling in the Deep
- Adele - 3:45
-
-
- API.getUserRecommendations());
+
+ if (!recommendations.data) {
+ return
+
+ ;
+ }
+ return
+
+ Rolling in the Deep
+ Adele - 3:45
+
+
+
+
+
+
+
+
+ 80
+
+ ' ' + t}/>
+
+
+
+ 80
+
+ ' ' + t}/>
+
+
+ t + ' : '}/>
+
+ {"80" + "%"}
+
+
+
+ {/* Precision */}
+
+
+
+
+ }
+ songs={recommendations.data.map((i) => ({
+ albumCover: i.cover,
+ songTitle: i.name ,
+ artistName: "Artist",
+ songId: i.id
+ }))}
+ />
+
+ navigation.navigate('Home')}
/>
-
-
-
-
-
- 80
-
- ' ' + t}/>
-
-
-
- 80
-
- ' ' + t}/>
-
-
- t + ' : '}/>
-
- {"80" + "%"}
-
-
-
- {/* Precision */}
-
-
-
-
- }
- maxItemPerRow={5}
- songs={Array.of(1, 2, 3, 4, 5).map((i) => ({
- albumCover: "",
- songTitle: 'Song ' + i,
- artistName: "Artist",
- songId: i
- }))}
- />
-
- navigation.navigate('Home')}
- />
- navigation.navigate('Song', { songId: 1 })}
- translate={{ translationKey: 'playAgain' }}
- />
-
-
+ navigation.navigate('Song', { songId: 1 })}
+ translate={{ translationKey: 'playAgain' }}
+ />
+
+
+
}
export default ScoreView;