2 lines
1.7 KiB
JavaScript
Executable File
2 lines
1.7 KiB
JavaScript
Executable File
"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[8785],{80321:(e,a,c)=>{c.r(a),c.d(a,{default:()=>S});var s=c(82187),r=c.n(s),t=c(10226),n=c(85648),l=(c(86277),c(50959)),h=c(75802),i=c(69736),o=c(75655),d=c(76578),g=c(45438),u=c(80626),p=c(70930),x=c(17814);const j="Ul_eSpTV7OKDhvXcgfzw",y="HFNTjI36ujrPacyLOwTT";var f=c(11527);const b=()=>{const{searchHistory:e,clearSearchHistory:a}=(0,x.u)(),c=(0,h.s0)(),{spec:s,logger:r,UBIFragment:t}=(0,u.fU)(o.createDesktopRecentSearchesEventFactory,{data:{uri:"spotify:app:recent-searches"}}),b=(0,l.useMemo)((()=>s.recentSearchesCardsFactory()),[s]),v=(0,l.useCallback)((()=>{const e=s.clearButtonFactory().hitClearRecentSearches();r.logInteraction(e),a(),c("/search")}),[a,r,c,s]),k=(0,l.useCallback)((s=>{const r=e.length;a(s),1===r&&c("/search")}),[a,c,e.length]);return 0===e.length?null:(0,f.jsxs)("div",{className:j,children:[(0,f.jsx)(t,{spec:b,children:(0,f.jsx)(p.P,{title:n.ag.get("search.title.recent-searches"),showAll:!0,children:e.map(((e,a)=>(0,f.jsx)(g.JL,{index:a,value:"search-history",children:(0,f.jsx)(d.q,{clearSearchHistory:k,entity:e,index:a})},e.uri)))})}),(0,f.jsx)("button",{onClick:v,className:y,children:(0,f.jsx)(i.x,{variant:"bodySmallBold",children:n.ag.get("search.clear-recent-searches")})})]})};var v=c(17676),k=c(41038),w=c(37286);const S=()=>{const e=(0,t.W6)(v.Dzq);return(0,f.jsxs)(g.JL,{value:"search-page",children:[(0,f.jsx)(k.$,{children:n.ag.get("search.page-title")}),(0,f.jsx)("div",{className:r()("contentSpacing",{[w.Z.narrowPage]:e}),id:"searchPage",children:(0,f.jsx)(b,{})})]})}}}]);
|
|
//# sourceMappingURL=xpui-routes-recent-searches.js.map
|