onChange={(e) =>
setTest(
produce((draft) => {
draft.conditions.forEach((c) =>
c.conditionProperties.forEach((prop) => {
if (prop.propertyName === item.propertyName) {
prop.propertyValue = e.target.value;
}
})
);
})
)
}
<style>
.mainblock{
display:flex;
flex-flow:row;
border:solid 2px #ff0000;
align-content:center;
justify-content:center;
}
.columnblock{
display:flex;
flex-flow:column;
border:solid 2px #00ff00;
}
.itemblock{
width: 300px;
display:flex;
flex-flow:row;
align-content:center;
justify-content:space-between;
border:solid 2px #0000ff;
}
.itemtitle {
display:flex;
flex-flow:column;
align-content:center;
justify-content:center;
}
.itemicon {
width:48px;
display:flex;
flex-flow:column;
align-content:center;
justify-content:center;
border:solid 2px #555555;
}
.itemicon img {
height: 48px;
}
</style>
<div class="mainblock">
<div class="columnblock">
<div class="itemblock">
<div class="itemtitle"><div>Item title</div></div><div class="itemicon"><img src="https://cdn3.iconfinder.com/data/icons/faticons/32/arrow-right-01-512.png"/></div>
</div>
<div class="itemblock">
<div class="itemtitle"><div>Item title</div></div><div class="itemicon"><img src="https://cdn3.iconfinder.com/data/icons/faticons/32/arrow-right-01-512.png"/></div>
</div>
</div>
<div class="columnblock">
<div class="itemblock">
<div class="itemtitle"><div>Item title</div></div><div class="itemicon"><img src="https://cdn3.iconfinder.com/data/icons/faticons/32/arrow-right-01-512.png"/></div>
</div>
<div class="itemblock">
<div class="itemtitle"><div>Item title</div></div><div class="itemicon"><img src="https://cdn3.iconfinder.com/data/icons/faticons/32/arrow-right-01-512.png"/></div>
</div>
</div>
</div>
если ввожу правильные данные сначало идет долгая загрузка. и вылетает ошибка "Страница недоступна Сайт localhost не отправил данных.
app.post('/login', (req, res) => {
User.findOne({
where: {
email: req.body.email
}
})
.then(user => {
if (!user) {
return res.status(404).send({ message: "Введены неправильные данные!" });
}
const passwordIsValid = bcrypt.compareSync(req.body.password, user.password)
if (!passwordIsValid) {
return res.status(401).send({
message: "Введены неправильные данные!"
});
}
req.session.userId = user.id // ОК
// и что дальше?
})
})
const childElements = photos.map(photo => (
<li className="list-unstyled">
<Link to={`/${photo.id}`}>
<img
className={`rounded ${ hovered === photo.id ? 'hover-class' : '' }`}
style={styles}
src={photo.urls.small}
alt={photo.description}
onMouseOut={() => {
setHovered(null)
}}
onMouseOver={() => {
setHovered(photo.id)
}}
/>
</Link>
</li>
))
data = [[34225, "EK", Array(2)], [74322, "EK", Array(2)], [53769, "MH", Array(2)],[53281, "SU", Array(2)], [30178, "EK", Array(2)]]
data.sort((a, b) => a[0] - b[0])
<Route path="/:id" component={SinglePhoto} /> <Route path="/history" component={SearchHistory} />