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

This commit is contained in:
VITALY-VORON
2023-08-26 07:31:19 +03:00
parent f492f2efb9
commit a26865508a
4 changed files with 11 additions and 16 deletions

View File

@ -109,7 +109,8 @@ const City = (props) => {
<button
onClick={() => {
route('/second')
setUserData(prevUserData => ({ ...prevUserData, selectedCity: selectedCity}));
setUserData({selectedCity: selectedCity});
console.log(selectedCity);
}}
className="animated-button"
style={{

View File

@ -1,13 +1,10 @@
import React, {useState, useEffect} from "react";
import React, { useEffect } from "react";
const Main = (props) => {
const city = props.selectedCity;
const id = props.identification;
const Main = ({userData}) => {
useEffect(() => {
console.log(city && id);
console.log(userData.selectedCity);
console.log(userData.unique);
})
return (

View File

@ -44,7 +44,9 @@ const Tinder = (props) => {
var uniqueIds = [...new Set(allIds)];
if(uniqueIds.length === cardInfo.length) {
route('/main');
setUserData(prevUserData => ({ ...prevUserData, unique }));
setUserData(prevUserData => ({ ...prevUserData, unique: unique }));
console.log(unique);
console.log(props.userData);
}
}}
>