fix
This commit is contained in:
@@ -6,25 +6,11 @@ import axios from 'axios';
|
||||
const Tinder = (props) => {
|
||||
|
||||
const route = props.getValue;
|
||||
const cardInfo = props.cardInfo;
|
||||
|
||||
const [lastDirection, setLastDirection] = useState();
|
||||
const [cardId, setCardId] = useState([]);
|
||||
const [allIds, setAllIds] = useState([]);
|
||||
const [cardInfo, setCardInfo] = useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
const fetchData = () => {
|
||||
axios.get('https://easytravel.zetcraft.ru/v1/GetAllCards')
|
||||
.then(response => {
|
||||
setCardInfo(response.data);
|
||||
console.log(cardInfo.length);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error fetching data:', error);
|
||||
});
|
||||
}
|
||||
fetchData();
|
||||
}, []);
|
||||
|
||||
const swiped = (direction, id) => {
|
||||
setLastDirection(direction);
|
||||
|
||||
Reference in New Issue
Block a user