main
All checks were successful
Create and publish a Docker image / Publish image (push) Successful in 57s
Create and publish a Docker image / Deploy image (push) Successful in 6s

This commit is contained in:
VITALY-VORON
2023-08-26 06:52:11 +03:00
parent 107f361f36
commit f492f2efb9
4 changed files with 52 additions and 15 deletions

View File

@ -3,6 +3,7 @@ import axios from "axios";
const City = (props) => {
const route = props.getValue;
const setUserData = props.setUserData
const [cityOptions, setCityOptions] = useState([]);
const [filteredCityOptions, setFilteredCityOptions] = useState([]);
@ -71,7 +72,7 @@ const City = (props) => {
justifyContent: 'center',
width: 304,
}}>
<img src="./image 2.png" alt="#" style={{
<img src='./image 2.png' alt="#" style={{
width: 282,
height: 282,
}} />
@ -106,7 +107,10 @@ const City = (props) => {
gap: 10,
}}>
<button
onClick={() => route('/second')}
onClick={() => {
route('/second')
setUserData(prevUserData => ({ ...prevUserData, selectedCity: selectedCity}));
}}
className="animated-button"
style={{
width: 304,

View File

@ -1,4 +1,15 @@
const Main = () => {
import React, {useState, useEffect} from "react";
const Main = (props) => {
const city = props.selectedCity;
const id = props.identification;
useEffect(() => {
console.log(city && id);
})
return (
<div>
<span>Переход готов</span>

View File

@ -6,6 +6,7 @@ const Tinder = (props) => {
const route = props.getValue;
const cardInfo = props.cardInfo;
const setUserData = props.setUserData;
const [lastDirection, setLastDirection] = useState();
const [cardId, setCardId] = useState([]);
@ -43,7 +44,7 @@ const Tinder = (props) => {
var uniqueIds = [...new Set(allIds)];
if(uniqueIds.length === cardInfo.length) {
route('/main');
console.log(unique);
setUserData(prevUserData => ({ ...prevUserData, unique }));
}
}}
>
@ -90,7 +91,7 @@ const Tinder = (props) => {
}}
onClick={() => handleDislike(card.id)}
>
<img src="./Dis.png" alt='#' style={{
<img src="./dis.jpg" alt='#' style={{
height: '100%',
width: '100%',
}} onClick={() => handleDislike(card.id)}/>
@ -104,7 +105,7 @@ const Tinder = (props) => {
}}
onClick={() => handleLike(card.id)}
>
<img src="./Like.png" alt='#' style={{
<img src="./like.jpg" alt='#' style={{
height: '100%',
width: '100%',
}} onClick={() => handleLike(card.id)}/>