mirror of
https://github.com/kristoferssolo/solorice.git
synced 2025-10-21 20:10:34 +00:00
2 lines
2.7 KiB
JavaScript
Executable File
2 lines
2.7 KiB
JavaScript
Executable File
"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[4789],{84968:(t,e,r)=>{r.r(e),r.d(e,{OnTourPlaylistCard:()=>k,default:()=>k});var n=r(12341),a=(r(2823),r(91281),r(13534)),i=r(11854),c=(r(7651),r(30456),r(26701),r(37417),r(11737),r(51691),r(702),r(5672),r(43379),r(34192),r(88856),r(51565),r(18316),r(52542)),l=r(13734),o=r(30758),s=r(68150),u=r(8574),f=r(496),d=r(64869),p=r(86070),b=["uri","pathname","onClick"];function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function v(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?h(Object(r),!0).forEach((function(e){(0,c.A)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}const m=(0,o.memo)((function(t){var e=t.uri,r=t.pathname,n=t.onClick,a=(0,l.A)(t,b),i=(0,u.W)(),c=(0,d.z)(),h=(0,o.useContext)(f.ql),m=(0,o.useCallback)((function(t){i({intent:"navigate",type:"click",targetUri:e}),null==n||n(t)}),[i,e,n]),j={referrer:h||c.getReferrer()};return(0,p.jsx)(s.N_,v(v({},a),{},{to:{pathname:r},state:j,onClick:m}))})),j="OY58H9mX1WFQsW7RLQl0",y="tNh3W7imBCa8Yp0CS0rF",O="k30gFYUEDBj0Rs5Mqroo",g="BefqJa4WI690UuQdyvH4";var x=/^spotify:artist:([a-zA-Z0-9]+):concerts$/,_=/^spotify:concert:([a-zA-Z0-9]+)$/;const k=function(t){var e=function(t){if(!t||"concerts-flp"!==t.type)return null;var e=t.attributes,r=e.tour_title,n=e.tour_location,a=e.tour_artwork_url,i=e.tour_cta_text,c=e.tour_nav_uri,l=e.tour_subtitle,o=e.tour_date;return r&&n&&a&&i&&c?{title:r,location:n,imageUrl:a,ctaText:i,navUri:c,subtitle:l,date:o}:null}(t.formatListData);if(!e)return null;var r=function(t){var e=t.match(x)||[],r=(0,n.A)(e,2)[1];if(r)return"/artist/".concat(r,"/concerts");var a=t.match(_)||[],i=(0,n.A)(a,2)[1];return i&&"/concert/".concat(i)}(e.navUri);return r?(0,p.jsx)("section",{children:(0,p.jsxs)(m,{uri:e.navUri,pathname:r,className:j,title:e.ctaText,children:[(0,p.jsx)("img",{className:O,src:e.imageUrl,alt:""}),e.date&&(0,p.jsx)("div",{className:y,children:(0,p.jsx)(a.E,{as:"h5",variant:"marginalBold",children:e.date})}),(0,p.jsxs)("div",{className:g,children:[(0,p.jsxs)("div",{children:[(0,p.jsx)(a.E,{as:"h2",variant:"bodyMedium",children:e.title}),(0,p.jsx)(a.E,{as:"div",variant:"bodySmall",children:e.location})]}),(0,p.jsx)("div",{children:(0,p.jsx)(i.$,{as:"span",size:"small",children:e.ctaText})})]})]})}):null}}}]);
|
|
//# sourceMappingURL=concerts-on-tour-playlist-card.js.map
|