diff --git a/src/FLAD/Model/factory/MusicFactory.ts b/src/FLAD/Model/factory/MusicFactory.ts index e26238b..c634082 100644 --- a/src/FLAD/Model/factory/MusicFactory.ts +++ b/src/FLAD/Model/factory/MusicFactory.ts @@ -1,24 +1,14 @@ import Music from "../Music"; export default class MusicFactory { - static mapFromSpotifyTrack(jsonMusic :any ): Music { - const music = new Music( - jsonMusic.id, - jsonMusic.name, - "", - jsonMusic.album.images[0].url, - jsonMusic.preview_url - ); - return music; - } - static mapFromSpotifyTrackSmpified(jsonMusic :any ): Music { - const music = new Music( - jsonMusic.id, - jsonMusic.name, - "", - jsonMusic.album.images[0].url, - jsonMusic.preview_url - ); + static mapFromSpotifyTrack(jsonMusic: any): Music { + const music = new Music( + jsonMusic.id, + jsonMusic.name, + "", + jsonMusic.album.images[0].url, + jsonMusic.preview_url + ); return music; } - } \ No newline at end of file +} \ No newline at end of file diff --git a/src/FLAD/components/AdjustSize.tsx b/src/FLAD/components/AdjustSize.tsx index 842f087..32ae5ed 100644 --- a/src/FLAD/components/AdjustSize.tsx +++ b/src/FLAD/components/AdjustSize.tsx @@ -1,4 +1,4 @@ -export default function AdjustSize(Text: String) { +export default function AdjustSize(Text: string) { const titleLength = Text.length; const minFontSize = 23; const maxFontSize = 48; diff --git a/src/FLAD/components/Artist.tsx b/src/FLAD/components/Artist.tsx index 9f86130..4a6fb64 100644 --- a/src/FLAD/components/Artist.tsx +++ b/src/FLAD/components/Artist.tsx @@ -19,12 +19,6 @@ interface ArtistProps { } export const Artist = ({ artist, onPress }: ArtistProps) => { const source = typeof artist.image === 'string' ? { uri: artist.image } : artist.image; - //@ts-ignore - const onSingleTapEvent = (event) => { - if (event.nativeEvent.state === State.ACTIVE) { - alert('Hey single tap!'); - } - }; const [selected, setSeleted] = useState(false); const onS = () => { setSeleted(!selected); diff --git a/src/FLAD/components/Genre.tsx b/src/FLAD/components/Genre.tsx index 53962f6..1cbbf38 100644 --- a/src/FLAD/components/Genre.tsx +++ b/src/FLAD/components/Genre.tsx @@ -1,8 +1,7 @@ import { useState } from "react"; -import { ScrollView } from "react-native"; +import { ScrollView, StyleSheet } from "react-native"; import Music from "../Model/Music"; import { Artist } from "./Artist"; -import { StyleSheet } from "react-native"; export const ArtistLayout = () => { const MUSIC_LIST: Music[] = [ @@ -16,7 +15,6 @@ export const ArtistLayout = () => { new Music("Kratos", "PNL", "https://upload.wikimedia.org/wikipedia/en/a/a0/PNL_-_Dans_la_l%C3%A9gende.png"), ] const [artists, setArtists] = useState(MUSIC_LIST); - const [selectedArtists, setSelectedArtists] = useState([]); return ( diff --git a/src/FLAD/components/HorizontalFlatList.tsx b/src/FLAD/components/HorizontalFlatList.tsx index 16cd110..5df0a3d 100644 --- a/src/FLAD/components/HorizontalFlatList.tsx +++ b/src/FLAD/components/HorizontalFlatList.tsx @@ -3,7 +3,6 @@ import { RenderCellProps } from "./littleCard"; interface HorizontalFlatListProps { - // React.ReactNode; children: (props: RenderCellProps) => React.ReactElement title: string; data: any[]; diff --git a/src/FLAD/components/Onboarding.tsx b/src/FLAD/components/Onboarding.tsx index 97fd60e..4ecdf07 100644 --- a/src/FLAD/components/Onboarding.tsx +++ b/src/FLAD/components/Onboarding.tsx @@ -1,6 +1,5 @@ import React, { useState, useRef } from 'react'; import { Modal, View, StyleSheet, useColorScheme, Text, FlatList, Animated, TouchableOpacity, ImageBackground, Image } from 'react-native'; -// import Modal from "react-native-modal"; import { useNavigation } from "@react-navigation/native"; import normalize from '../components/Normalize'; import OnboardingItem from './OnboardingItem'; diff --git a/src/FLAD/navigation/SpotNavigation.tsx b/src/FLAD/navigation/SpotNavigation.tsx index c899ce0..6a62c06 100644 --- a/src/FLAD/navigation/SpotNavigation.tsx +++ b/src/FLAD/navigation/SpotNavigation.tsx @@ -5,7 +5,6 @@ import MusicDetail from '../screens/MusicDetail'; export default function SpotNavigation() { - // const Stack = createSharedElementStackNavigator(); const Stack = createStackNavigator(); return ( diff --git a/src/FLAD/redux/actions/musicActions.tsx b/src/FLAD/redux/actions/musicActions.tsx deleted file mode 100644 index 04446a4..0000000 --- a/src/FLAD/redux/actions/musicActions.tsx +++ /dev/null @@ -1,6 +0,0 @@ -// export const UserLogin = (username: string, password: string) => { -// return { -// type: userTypes.LOGIN, -// playload : username, password -// }; -// } \ No newline at end of file diff --git a/src/FLAD/redux/thunk/authThunk.tsx b/src/FLAD/redux/thunk/authThunk.tsx index 5e06a38..13432d8 100644 --- a/src/FLAD/redux/thunk/authThunk.tsx +++ b/src/FLAD/redux/thunk/authThunk.tsx @@ -96,7 +96,7 @@ export const getRefreshToken = () => { dispatch(restoreToken(empty)); } } catch (e) { - console.log('Error---------', e); + console.log('Error :', e); } } } diff --git a/src/FLAD/redux/thunk/spotThunk.tsx b/src/FLAD/redux/thunk/spotThunk.tsx index d85ec69..6b944ef 100644 --- a/src/FLAD/redux/thunk/spotThunk.tsx +++ b/src/FLAD/redux/thunk/spotThunk.tsx @@ -18,7 +18,7 @@ export const getSpotList = (resuestHandler: SpotifyService) => { return async dispatch => { try { //@ts-ignore - var userToken: string = await SecureStore.getItemAsync(key); + const userToken: string = await SecureStore.getItemAsync(key); const headers = { 'Authorization': 'Bearer ' + userToken }; diff --git a/src/FLAD/screens/MusicDetail.tsx b/src/FLAD/screens/MusicDetail.tsx index 05821d8..cfa4f51 100644 --- a/src/FLAD/screens/MusicDetail.tsx +++ b/src/FLAD/screens/MusicDetail.tsx @@ -13,7 +13,6 @@ import { Feather as Icon } from "@expo/vector-icons"; import { HorizontalFlatList } from "../components/HorizontalFlatList"; import { LittleCard } from "../components/littleCard"; import * as SecureStore from 'expo-secure-store'; -import { useSelector } from "react-redux"; const halfPi = Math.PI / 2; @@ -21,7 +20,7 @@ const halfPi = Math.PI / 2; //@ts-ignore const MusicDetail = ({ route }) => { const music: Music = route.params.music; - const [currentspot, setCurrentSpot] = useState(music); + const [currentspot] = useState(music); const [simularMusic, setSimularMusic] = useState([]); const [isPlaying, setIsPlaying] = useState(false); const [sound, setSound] = useState(null); @@ -87,7 +86,7 @@ const MusicDetail = ({ route }) => { const sensor = useAnimatedSensor(SensorType.ROTATION); const styleAniamatedImage = useAnimatedStyle(() => { - const { yaw, pitch, roll } = sensor.sensor.value; + const { pitch, roll } = sensor.sensor.value; const verticalAxis = interpolate( pitch, [-halfPi * 2, halfPi * 2], diff --git a/src/FLAD/screens/SettingProfil.tsx b/src/FLAD/screens/SettingProfil.tsx index d561f3b..a68e47f 100644 --- a/src/FLAD/screens/SettingProfil.tsx +++ b/src/FLAD/screens/SettingProfil.tsx @@ -1,10 +1,10 @@ -import React, { useState, useRef, useEffect } from 'react'; +import React, { useEffect } from 'react'; import { View, Text, StyleSheet, TouchableWithoutFeedback, Keyboard, ScrollView, Image } from 'react-native'; import { TextInput, TouchableOpacity } from 'react-native-gesture-handler'; import { Svg, Path } from 'react-native-svg'; import Modal from "react-native-modal"; import { useNavigation } from "@react-navigation/native"; -import { useDispatch, useSelector } from 'react-redux'; +import { useSelector } from 'react-redux'; import normalize from '../components/Normalize'; import * as ImagePicker from 'expo-image-picker'; @@ -43,8 +43,6 @@ export default function SettingProfil() { aspect: [4, 3], quality: 1, }); - if (!result.canceled) { - } }; const styles = StyleSheet.create({ diff --git a/src/FLAD/screens/SpotDetailsPage.tsx b/src/FLAD/screens/SpotDetailsPage.tsx index 5724794..c31f6c4 100644 --- a/src/FLAD/screens/SpotDetailsPage.tsx +++ b/src/FLAD/screens/SpotDetailsPage.tsx @@ -55,7 +55,6 @@ const SpotDetailsPage = ({ route }) => { : undefined; }, [sound]); - console.log(spot); const sensor = useAnimatedSensor(SensorType.ROTATION); const styleAniamatedImage = useAnimatedStyle(() => { const { pitch, roll } = sensor.sensor.value; @@ -75,7 +74,7 @@ const SpotDetailsPage = ({ route }) => { }; }) - var id = '0cFS3AMF9Lhj3CNoFvwjvY' + const id = '0cFS3AMF9Lhj3CNoFvwjvY' const getCurrentTrack = async () => { try { diff --git a/src/FLAD/screens/login.tsx b/src/FLAD/screens/login.tsx index 8bd35c0..4bab028 100644 --- a/src/FLAD/screens/login.tsx +++ b/src/FLAD/screens/login.tsx @@ -1,4 +1,4 @@ -import { View, Text, StyleSheet, Button, Platform } from 'react-native' +import { View, Text, StyleSheet, Button } from 'react-native' import React from 'react' import * as AuthSession from 'expo-auth-session'; import * as WebBrowser from 'expo-web-browser';