diff --git a/src/FLAD/screens/MusicDetail.tsx b/src/FLAD/screens/MusicDetail.tsx index cfa4f51..cd43325 100644 --- a/src/FLAD/screens/MusicDetail.tsx +++ b/src/FLAD/screens/MusicDetail.tsx @@ -72,8 +72,6 @@ const MusicDetail = ({ route }) => { //@ts-ignore await sound.stopAsync(); } - else { - } }; useEffect(() => { return sound ? () => { diff --git a/src/FLAD/screens/Setting.tsx b/src/FLAD/screens/Setting.tsx index 704c1a1..601a041 100644 --- a/src/FLAD/screens/Setting.tsx +++ b/src/FLAD/screens/Setting.tsx @@ -3,12 +3,11 @@ import AsyncStorage from '@react-native-async-storage/async-storage'; import { View, StyleSheet, Text, Image, TouchableWithoutFeedback, Keyboard, TouchableOpacity, SafeAreaView } from 'react-native'; import { Svg, Path } from 'react-native-svg'; import { useNavigation } from "@react-navigation/native"; -import { useDispatch } from 'react-redux'; +import { useDispatch, useSelector } from 'react-redux'; import normalize from '../components/Normalize'; import { ScrollView, Switch, TextInput } from 'react-native-gesture-handler'; import CardMusic from '../components/CardMusic'; import { ChangeMode, DeleteToken } from '../redux/thunk/authThunk'; -import { useSelector } from 'react-redux'; import { GraphicalCharterDark } from '../assets/GraphicalCharterDark'; import { GraphicalCharterLight } from '../assets/GraphicalCharterLight'; @@ -327,7 +326,7 @@ export default function Setting() { - + diff --git a/src/FLAD/screens/SettingProfil.tsx b/src/FLAD/screens/SettingProfil.tsx index a68e47f..927ebbe 100644 --- a/src/FLAD/screens/SettingProfil.tsx +++ b/src/FLAD/screens/SettingProfil.tsx @@ -37,7 +37,7 @@ export default function SettingProfil() { const pickImage = async () => { - let result = await ImagePicker.launchImageLibraryAsync({ + await ImagePicker.launchImageLibraryAsync({ mediaTypes: ImagePicker.MediaTypeOptions.All, allowsEditing: true, aspect: [4, 3], diff --git a/src/FLAD/screens/login.tsx b/src/FLAD/screens/login.tsx index 4bab028..8249a29 100644 --- a/src/FLAD/screens/login.tsx +++ b/src/FLAD/screens/login.tsx @@ -72,7 +72,6 @@ export default function Login() { }, body: `grant_type=authorization_code&code=${authorizationCode}&redirect_uri=https://auth.expo.io/@anonymous/FLAD-7eafd441-fd6b-4fb6-924c-ec2b0ed5ce6d`, }); - const responseJson = await response.json() } catch (err) { console.error(err) } diff --git a/src/FLAD/services/spotify/spotifyRequestHandler/utils.tsx b/src/FLAD/services/spotify/spotifyRequestHandler/utils.tsx index b557491..4279e03 100644 --- a/src/FLAD/services/spotify/spotifyRequestHandler/utils.tsx +++ b/src/FLAD/services/spotify/spotifyRequestHandler/utils.tsx @@ -36,12 +36,6 @@ export class RequestHandler { } catch(error : any){ const errorMessage = error.response.data?.error?.message; - if (errorMessage === "Invalid access token" || errorMessage === "The access token expired") { - throw new Error; - } - else{ - throw new Error; - } } } }