From 4c403b9b1e729a7c64c5e51844b6152e721bb323 Mon Sep 17 00:00:00 2001 From: keksobot Date: Sat, 21 Dec 2024 09:58:06 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9C=94=EF=B8=8F=20=D0=A1=D0=B1=D0=BE=D1=80?= =?UTF-8?q?=D0=BA=D0=B0=20#14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 14/assets/{index-c80eea17.js => index-119c07fc.js} | 2 +- 14/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename 14/assets/{index-c80eea17.js => index-119c07fc.js} (99%) diff --git a/14/assets/index-c80eea17.js b/14/assets/index-119c07fc.js similarity index 99% rename from 14/assets/index-c80eea17.js rename to 14/assets/index-119c07fc.js index 6ce0aec..4d60e46 100644 --- a/14/assets/index-c80eea17.js +++ b/14/assets/index-119c07fc.js @@ -103,7 +103,7 @@ Error generating stack: `+a.message+` Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i=[],s=0;s{_r.dispatch(xo(e.id)),_r.dispatch(ay(e.id)),_r.dispatch(ly(e.id)),u(e.isFavorite)};z.useEffect(()=>{u(e.isFavorite)},[e.isFavorite]);const h=rt(bl),p=Yo(),m=()=>{if(h===Fe.NoAuth||h===Fe.Unknown){p(Xt.Login);return}_r.dispatch(uy({offerId:e.id,isFavorite:!a})),u(!a)};return w.jsxs("article",{className:`${t} place-card`,onMouseEnter:()=>n&&n(e.id),onMouseLeave:()=>n&&n(null),onMouseOver:()=>s(!i),children:[e.isPremium&&w.jsx("div",{className:"place-card__mark",children:w.jsx("span",{children:"Premium"})}),w.jsx("div",{className:"cities__image-wrapper place-card__image-wrapper",onClick:f,children:w.jsx(Yt,{to:`/offer/${e.id}`,children:w.jsx("img",{className:"place-card__image",src:e.previewImage,width:"260",height:"200",alt:e.title,onClick:f})})}),w.jsxs("div",{className:"place-card__info",children:[w.jsxs("div",{className:"place-card__price-wrapper",children:[w.jsxs("div",{className:"place-card__price",children:[w.jsxs("b",{className:"place-card__price-value",children:["€",e.price]}),w.jsx("span",{className:"place-card__price-text",children:"/ night"})]}),h&&w.jsxs("button",{className:Ho("place-card__bookmark-button","button",{"place-card__bookmark-button--active":a}),type:"button",onClick:m,children:[w.jsx("svg",{className:"place-card__bookmark-icon",width:"18",height:"19",children:w.jsx("use",{xlinkHref:"#icon-bookmark"})}),w.jsx("span",{className:"visually-hidden",children:"To bookmarks"})]})]}),w.jsx("div",{className:"place-card__rating rating",children:w.jsxs("div",{className:"place-card__stars rating__stars",children:[w.jsx("span",{style:{width:`${e.rating/5*100}%`}}),w.jsx("span",{className:"visually-hidden",children:"Rating"})]})}),w.jsx("h2",{className:"place-card__name",onClick:f,children:w.jsx(Yt,{to:`/offer/${e.id}`,children:e.title})}),w.jsx("p",{className:"place-card__type",children:e.type})]})]})}const Oy=({offers:e,cardcssname:t,setActiveOffer:n})=>{const[i,s]=z.useState(null);return w.jsxs("div",{className:"cities__places-list places__list tabs__content",children:[e==null?void 0:e.map(a=>w.jsx("div",{onMouseEnter:()=>s(a.id),onMouseLeave:()=>s(null),children:w.jsx(Ly,{offer:a,cardcssname:t,...n&&{setActiveOffer:n}})},a.id)),w.jsx("div",{children:i&&w.jsxs("p",{children:["Active Offer ID: ",i]})})]})},lL="tabs__item--active",uL=({currentCity:e,cities:t,onSelect:n})=>w.jsx("ul",{className:"locations__list tabs__list","data-testid":"location_item",children:t.map(i=>w.jsx("li",{className:"locations__item",onClick:()=>{n(i.title)},children:w.jsx("div",{className:` +*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i=[],s=0;s{_r.dispatch(xo(e.id)),_r.dispatch(ay(e.id)),_r.dispatch(ly(e.id)),u(e.isFavorite)};z.useEffect(()=>{u(e.isFavorite)},[e.isFavorite]);const h=rt(bl),p=Yo(),m=()=>{if(h===Fe.NoAuth||h===Fe.Unknown){p(Xt.Login);return}_r.dispatch(uy({offerId:e.id,isFavorite:!a})),u(!a)};return w.jsxs("article",{className:`${t} place-card`,onMouseEnter:()=>n&&n(e.id),onMouseLeave:()=>n&&n(null),onMouseOver:()=>s(!i),children:[e.isPremium&&w.jsx("div",{className:"place-card__mark",children:w.jsx("span",{children:"Premium"})}),w.jsx("div",{className:"cities__image-wrapper place-card__image-wrapper",onClick:f,children:w.jsx(Yt,{to:`/offer/${e.id}`,children:w.jsx("img",{className:"place-card__image",src:e.previewImage,width:"260",height:"200",alt:e.title,onClick:f})})}),w.jsxs("div",{className:"place-card__info",children:[w.jsxs("div",{className:"place-card__price-wrapper",children:[w.jsxs("div",{className:"place-card__price",children:[w.jsxs("b",{className:"place-card__price-value",children:["€",e.price]}),w.jsx("span",{className:"place-card__price-text",children:"/ night"})]}),h&&w.jsxs("button",{className:Ho("place-card__bookmark-button","button",{"place-card__bookmark-button--active":a}),type:"button",onClick:m,children:[w.jsx("svg",{className:"place-card__bookmark-icon",width:"18",height:"19",children:w.jsx("use",{xlinkHref:"#icon-bookmark"})}),w.jsx("span",{className:"visually-hidden",children:"To bookmarks"})]})]}),w.jsx("div",{className:"place-card__rating rating",children:w.jsxs("div",{className:"place-card__stars rating__stars",children:[w.jsx("span",{style:{width:`${e.rating/5*100}%`}}),w.jsx("span",{className:"visually-hidden",children:"Rating"})]})}),w.jsx("h2",{className:"place-card__name",onClick:f,children:w.jsx(Yt,{to:`/offer/${e.id}`,children:e.title})}),w.jsx("p",{className:"place-card__type",children:e.type})]})]})}const Oy=({offers:e,cardcssname:t,setActiveOffer:n})=>{const[i,s]=z.useState(null);return w.jsxs("div",{className:"cities__places-list places__list tabs__content",children:[e==null?void 0:e.map(a=>w.jsx("div",{onMouseEnter:()=>s(a.id),onMouseLeave:()=>s(null),children:w.jsx(Ly,{offer:a,cardcssname:t,...n&&{setActiveOffer:n}})},a.id)),w.jsx("div",{children:i&&w.jsxs("p",{children:["Active Offer ID: ",i]})})]})},lL="tabs__item--active",uL=({currentCity:e,cities:t,onSelect:n})=>w.jsx("ul",{className:"locations__list tabs__list",children:t.map(i=>w.jsx("li",{className:"locations__item","data-testid":"location_item",onClick:()=>{n(i.title)},children:w.jsx("div",{className:` locations__item-link tabs__item ${e===i.title?lL:""} diff --git a/14/index.html b/14/index.html index 2fe608b..17fe47e 100644 --- a/14/index.html +++ b/14/index.html @@ -7,7 +7,7 @@ 6 cities - +