final ftc commit : all look good 3
continuous-integration/drone/push Build is failing Details

MqqtMessage
David D'ALMEIDA 2 years ago
parent 2d9fe41999
commit 620dfc3ffa

@ -59,7 +59,6 @@ export default function AuthNavigation() {
console.log('Permission to access location was granted'); console.log('Permission to access location was granted');
} }
} }
console.log(currentMusic + 'luuuuuuuiii')
useEffect(() => { useEffect(() => {
ChangeDarkMode(); ChangeDarkMode();
prepare(); prepare();
@ -82,10 +81,6 @@ export default function AuthNavigation() {
latitude: locationresp.coords.latitude, latitude: locationresp.coords.latitude,
currentMusic: currentMusic.id currentMusic: currentMusic.id
} }
console.log('===========================================================================================================')
console.log(body)
console.log('===========================================================================================================')
const resp = await axios({ const resp = await axios({
url: 'https://flad-api-production.up.railway.app/api/users/nextTo?' + qs.stringify(body), url: 'https://flad-api-production.up.railway.app/api/users/nextTo?' + qs.stringify(body),
method: 'GET', method: 'GET',

@ -1,6 +1,10 @@
import { configureStore } from '@reduxjs/toolkit' import { configureStore } from '@reduxjs/toolkit'
import appReducer from './reducers/appReducer'; import appReducer from './reducers/appReducer';
import userReducer from './reducers/userReducer'; import userReducer from './reducers/userReducer';
import { spotTypes } from './types/spotTypes';
import { userTypes } from './types/userTypes';
import { spotifyTypes } from './types/spotifyTypes';
import { favoritesTypes } from './types/favoritesTypes';
// Reference here all your application reducers // Reference here all your application reducers
const reducer = { const reducer = {
@ -10,6 +14,13 @@ const reducer = {
const store = configureStore({ const store = configureStore({
reducer: reducer, reducer: reducer,
middleware: (getDefaultMiddleware) => getDefaultMiddleware({
serializableCheck: {
ignoredActions: [spotTypes.FETCH_SPOT, spotifyTypes.GET_USER_CURRENT_MUSIC, favoritesTypes.ADD_FAVORITE_MUSICS, favoritesTypes.REMOVE_FAVORITE_MUSICS ],
ignoredActionPaths: ['appReducer'],
ignoredPaths: ['appReducer', 'userReducer']
}
})
},); },);
export default store; export default store;

@ -13,9 +13,6 @@ export type CreateSpotReqBody = {
user: string; user: string;
} }
export const getSpotList = (spotsData : Record<string, string> , resuestHandler: SpotifyService) => { export const getSpotList = (spotsData : Record<string, string> , resuestHandler: SpotifyService) => {
console.log('oooooooooooooooooooooooooooostrat2oooooooooooooooooooooooooooooooooooo')
//@ts-ignore //@ts-ignore
return async dispatch => { return async dispatch => {
try { try {

@ -24,14 +24,11 @@ export default function SpotPage() {
const [currentCard, setcurrentCard] = useState(cards[cards.length - 1]); const [currentCard, setcurrentCard] = useState(cards[cards.length - 1]);
useEffect(() => { useEffect(() => {
console.log(cards.length + "================================== cards");
console.log(spotReducer.length + "================================== spotReducer")
setCards(spotReducer); setCards(spotReducer);
// update the state of the cards state variable
setcurrentCard(spotReducer[spotReducer.length - 1]); setcurrentCard(spotReducer[spotReducer.length - 1]);
}, [spotReducer]); }, [spotReducer]);
const onSwipe = (index: number, direction: 'left' | 'right' | 'down') => { const onSwipe = (direction: 'left' | 'right' | 'down') => {
if (direction === 'right') { if (direction === 'right') {
// Swiped right // Swiped right
@ -124,13 +121,13 @@ export default function SpotPage() {
<View style={{ flex: 1.83, justifyContent: 'center', alignItems: 'center' }}> <View style={{ flex: 1.83, justifyContent: 'center', alignItems: 'center' }}>
{cards.map((card, index) => ( {cards.map((card) => (
<View key={card.userSpotifyId} style={{ position: 'absolute' }} > <View key={card.userSpotifyId} style={{ position: 'absolute' }} >
<Pressable onLongPress={() => { hapti(card) }} > <Pressable onLongPress={() => { hapti(card) }} >
<Card <Card
title={card.music.title} title={card.music.title}
image={card.music.image} image={card.music.image}
onSwipe={(direction) => { onSwipe(index, direction) }} onSwipe={(direction) => { onSwipe(direction) }}
/> />
</Pressable> </Pressable>
</View> </View>
@ -140,13 +137,13 @@ export default function SpotPage() {
<View style={{ flex: 1, flexDirection: 'row', alignItems: "flex-start", justifyContent: 'center' }}> <View style={{ flex: 1, flexDirection: 'row', alignItems: "flex-start", justifyContent: 'center' }}>
<Animated.View style={{ flexDirection: 'row', width: '92%', alignItems: "center", justifyContent: 'space-evenly' }}> <Animated.View style={{ flexDirection: 'row', width: '92%', alignItems: "center", justifyContent: 'space-evenly' }}>
<TouchableOpacity style={styles.button} onPress={onLike}> <TouchableOpacity style={styles.button} onPress={() => onSwipe('left')}>
<LottieView autoPlay={false} loop={false} ref={likeButtonref} source={Lotties.likeAnimation} style={styles.lottie} /> <LottieView autoPlay={false} loop={false} ref={likeButtonref} source={Lotties.likeAnimation} style={styles.lottie} />
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity style={styles.button} onPress={addMockSpots}> <TouchableOpacity style={styles.button} onPress={() => onSwipe('down')}>
<LottieView autoPlay={false} loop={false} ref={likeButtonref} source={Lotties.likeAnimation} style={styles.lottie} /> <LottieView autoPlay={false} loop={false} ref={likeButtonref} source={Lotties.likeAnimation} style={styles.lottie} />
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity style={styles.button} onPress={onLike}> <TouchableOpacity style={styles.button} onPress={() => onSwipe('right')}>
<LottieView autoPlay={false} loop={false} ref={likeButtonref} speed={2} source={Lotties.likeAnimation} style={styles.lottie} /> <LottieView autoPlay={false} loop={false} ref={likeButtonref} speed={2} source={Lotties.likeAnimation} style={styles.lottie} />
</TouchableOpacity> </TouchableOpacity>

Loading…
Cancel
Save