diff --git a/src/FLAD/navigation/AuthNavigation.tsx b/src/FLAD/navigation/AuthNavigation.tsx index 5f32fc1..0228441 100644 --- a/src/FLAD/navigation/AuthNavigation.tsx +++ b/src/FLAD/navigation/AuthNavigation.tsx @@ -59,7 +59,6 @@ export default function AuthNavigation() { console.log('Permission to access location was granted'); } } - console.log(currentMusic + 'luuuuuuuiii') useEffect(() => { ChangeDarkMode(); prepare(); @@ -82,10 +81,6 @@ export default function AuthNavigation() { latitude: locationresp.coords.latitude, currentMusic: currentMusic.id } - console.log('===========================================================================================================') - console.log(body) - console.log('===========================================================================================================') - const resp = await axios({ url: 'https://flad-api-production.up.railway.app/api/users/nextTo?' + qs.stringify(body), method: 'GET', diff --git a/src/FLAD/redux/store.tsx b/src/FLAD/redux/store.tsx index 2d1d04e..8a0b49b 100644 --- a/src/FLAD/redux/store.tsx +++ b/src/FLAD/redux/store.tsx @@ -1,6 +1,10 @@ import { configureStore } from '@reduxjs/toolkit' import appReducer from './reducers/appReducer'; 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 const reducer = { @@ -10,6 +14,13 @@ const reducer = { const store = configureStore({ 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; \ No newline at end of file diff --git a/src/FLAD/redux/thunk/spotThunk.tsx b/src/FLAD/redux/thunk/spotThunk.tsx index 383aeea..4451c06 100644 --- a/src/FLAD/redux/thunk/spotThunk.tsx +++ b/src/FLAD/redux/thunk/spotThunk.tsx @@ -13,9 +13,6 @@ export type CreateSpotReqBody = { user: string; } export const getSpotList = (spotsData : Record , resuestHandler: SpotifyService) => { - - console.log('oooooooooooooooooooooooooooostrat2oooooooooooooooooooooooooooooooooooo') - //@ts-ignore return async dispatch => { try { diff --git a/src/FLAD/screens/spot.tsx b/src/FLAD/screens/spot.tsx index e0fbf1e..318a1e1 100644 --- a/src/FLAD/screens/spot.tsx +++ b/src/FLAD/screens/spot.tsx @@ -24,14 +24,11 @@ export default function SpotPage() { const [currentCard, setcurrentCard] = useState(cards[cards.length - 1]); useEffect(() => { - console.log(cards.length + "================================== cards"); - console.log(spotReducer.length + "================================== spotReducer") setCards(spotReducer); - // update the state of the cards state variable setcurrentCard(spotReducer[spotReducer.length - 1]); }, [spotReducer]); - const onSwipe = (index: number, direction: 'left' | 'right' | 'down') => { + const onSwipe = (direction: 'left' | 'right' | 'down') => { if (direction === 'right') { // Swiped right @@ -124,13 +121,13 @@ export default function SpotPage() { - {cards.map((card, index) => ( + {cards.map((card) => ( { hapti(card) }} > { onSwipe(index, direction) }} + onSwipe={(direction) => { onSwipe(direction) }} /> @@ -140,13 +137,13 @@ export default function SpotPage() { - + onSwipe('left')}> - + onSwipe('down')}> - + onSwipe('right')}>