diff --git a/front/components/V2/SearchBar.tsx b/front/components/V2/SearchBar.tsx
new file mode 100644
index 0000000..abf0296
--- /dev/null
+++ b/front/components/V2/SearchBar.tsx
@@ -0,0 +1,82 @@
+import React from "react";
+import { Text, Select } from 'native-base'
+import { TextInput, View } from "react-native";
+import ButtonBase from "../UI/ButtonBase";
+import Artist from "../../models/Artist";
+import Song from "../../models/Song";
+import { AddSquare } from 'iconsax-react-native';
+
+const artistsDummy = [
+ {
+ id: 0,
+ name: 'Momo'
+ },
+ {
+ id: 1,
+ name: 'Beethoven'
+ },
+ {
+ id: 2,
+ name: 'Chopin'
+ },
+ {
+ id: 3,
+ name: 'Wolfgang'
+ },
+];
+
+const genreDummy = [
+ {
+ id: 0,
+ name: 'Rock',
+ },
+ {
+ id: 1,
+ name: 'Classical',
+ },
+ {
+ id: 2,
+ name: 'Pop',
+ },
+ {
+ id: 3,
+ name: 'Jazz',
+ },
+];
+
+
+const SearchBarComponent = () => {
+ const [isTriggered, setIsTriggered] = React.useState(false);
+ const [genre, setGenre] = React.useState('')
+ const [query, setQuery] = React.useState('')
+ const [artistSearch, setArtistSearch] = React.useState([] as Artist[]);
+ const [songSearch, setSongSearch] = React.useState([] as Song[]);
+
+ return (
+
+
+
+
+
+
+
+ {artistsDummy.map((data) => (
+
+
+ {data.name}
+
+ ))}
+
+
+
+
+
+
+ )
+}
+
+export default SearchBarComponent;
\ No newline at end of file
diff --git a/front/views/LeaderboardView.tsx b/front/views/LeaderboardView.tsx
index 0eafcc9..90b6996 100644
--- a/front/views/LeaderboardView.tsx
+++ b/front/views/LeaderboardView.tsx
@@ -1,16 +1,19 @@
import { Box, Heading, useBreakpointValue, ScrollView, Text } from 'native-base';
import { View, Image } from 'react-native';
-import { useQuery } from 'react-query';
-import User from '../models/User';
+import { useQuery } from '../Queries';
import API from '../API';
import { Ionicons } from '@expo/vector-icons';
+import User from '../models/User';
type PodiumCardProps = {
offset: number;
medalColor: string;
+ userAvatarUrl: string;
+ userPseudo: string;
+ userXp: number;
};
-const PodiumCardComponent = ({ offset, medalColor }: PodiumCardProps) => {
+const PodiumCardComponent = ({ offset, medalColor, userAvatarUrl, userPseudo, userXp }: PodiumCardProps) => {
return (
{
>
{
fontWeight: '500',
}}
>
- Momo
+ {userPseudo}
{
fontWeight: '500',
}}
>
- 2400 LVL
+ {userXp} LVL
);
};
+type BoardRowProps = {
+ userPseudo: string;
+ userXp: number;
+}
+
const BoardRowComponent = () => {
return (
{
{
- // const scoresQuery = useQuery(API.getTopTwentyPlayers())
+ const scoresQuery = useQuery(API.getTopTwentyPlayers);
+
return (
{
marginBottom: 20,
}}
>
-
-
-
+
+
+
{dummyScores.map((comp, index) => (
diff --git a/front/views/SearchView.tsx b/front/views/SearchView.tsx
index 4c5bd35..af83f25 100644
--- a/front/views/SearchView.tsx
+++ b/front/views/SearchView.tsx
@@ -1,12 +1,13 @@
import React, { useState } from 'react';
import SearchBar from '../components/SearchBar';
+import SearchBarComponent from '../components/V2/SearchBar'
import Artist from '../models/Artist';
import Song from '../models/Song';
import Genre from '../models/Genre';
import API from '../API';
import { useQuery } from '../Queries';
import { SearchResultComponent } from '../components/SearchResult';
-import { SafeAreaView } from 'react-native';
+import { SafeAreaView, View } from 'react-native';
import { Filter } from '../components/SearchBar';
import { ScrollView } from 'native-base';
import { RouteProps } from '../Navigation';
@@ -99,8 +100,10 @@ const SearchView = (props: RouteProps) => {
updateStringQuery,
}}
>
-
-
+
+
+
+