PageSourceSearch

https://www.uppy.ai/assets/ItemFeedback-BwHhz3iV.js

js uppy.ai collected 2026-10-05 14:55:44 UTC 6,067 bytes, 1 lines download raw bytes

1import{r as c,j as e}from"./react-vendor-DcRcMroe.js";import{a as v,t as w,C,b as y,L as S,r as I,c as T,e as R,d as k,B as r}from"./index-Ba_Q89IQ.js";import{C as U}from"./circle-check-big-Bg5txjwK.js";import{T as D,a as E}from"./thumbs-up-Cbguo9Mv.js";import{S as L}from"./settings-CF-q-GAN.js";function M(){const[,o]=v(),[t,n]=c.useState("loading"),[a,F]=c.useState(null),[p,j]=c.useState(""),[g,f]=c.useState(null),N=w.itemFeedback.submitByToken.useMutation({onSuccess:()=>{n("success")},onError:s=>{console.error("Feedback submission error:",s),n("error")}});return c.useEffect(()=>{const s=new URLSearchParams(window.location.search),l=s.get("reportId"),d=s.get("monitorId"),b=s.get("userId"),i=s.get("itemIndex"),m=s.get("itemTitle"),u=s.get("itemSource"),h=s.get("itemUrl"),x=s.get("rating");if(!l||!d||!b||!i||!m||!x){n("error");return}F(x),j(decodeURIComponent(m)),f(parseInt(d)),N.mutate({token:`${l}-${i}-${Date.now()}`,reportId:parseInt(l),monitorId:parseInt(d),userId:parseInt(b),itemIndex:parseInt(i),itemTitle:decodeURIComponent(m),itemUrl:h?decodeURIComponent(h):void 0,itemSource:u?decodeURIComponent(u):void 0,rating:x})},[]),e.jsxs("div",{"data-loc":"client/src/pages/ItemFeedback.tsx:61",className:"min-h-screen bg-gradient-to-b from-slate-50 to-white flex items-center justify-center p-4",children:[e.jsxs(C,{"data-loc":"client/src/pages/ItemFeedback.tsx:62",className:"max-w-md w-full",children:[e.jsxs(y,{"data-loc":"client/src/pages/ItemFeedback.tsx:63",className:"text-center",children:[e.jsxs("div",{"data-loc":"client/src/pages/ItemFeedback.tsx:64",className:"mx-auto mb-4",children:[t==="loading"&&e.jsx(S,{"data-loc":"client/src/pages/ItemFeedback.tsx:66",className:"h-12 w-12 text-primary animate-spin"}),t==="success"&&a==="relevant"&&e.jsx(U,{"data-loc":"client/src/pages/ItemFeedback.tsx:69",className:"h-12 w-12 text-green-500"}),t==="success"&&a==="irrelevant"&&e.jsx(I,{"data-loc":"client/src/pages/ItemFeedback.tsx:72",className:"h-12 w-12 text-red-500"}),t==="error"&&e.jsx(I,{"data-loc":"client/src/pages/ItemFeedback.tsx:75",className:"h-12 w-12 text-gray-400"})]}),e.jsxs(T,{"data-loc":"client/src/pages/ItemFeedback.tsx:78",children:[t==="loading"&&"Recording your feedback...",t==="success"&&"Thank you for your feedback!",t==="error"&&"Something went wrong"]}),e.jsxs(R,{"data-loc":"client/src/pages/ItemFeedback.tsx:83",children:[t==="success"&&a==="relevant"&&e.jsx(e.Fragment,{children:"You marked this item as relevant. We'll show you more content like this."}),t==="success"&&a==="irrelevant"&&e.jsx(e.Fragment,{children:"You marked this item as not relevant. We'll improve your future reports based on this feedback."}),t==="error"&&e.jsx(e.Fragment,{children:"We couldn't record your feedback. Please try again or contact support."})]})]}),t==="success"&&e.jsxs(k,{"data-loc":"client/src/pages/ItemFeedback.tsx:97",className:"space-y-4",children:[p&&e.jsxs("div",{"data-loc":"client/src/pages/ItemFeedback.tsx:100",className:"bg-slate-50 rounded-lg p-4 border",children:[e.jsx("p",{"data-loc":"client/src/pages/ItemFeedback.tsx:101",className:"text-sm text-muted-foreground mb-1",children:"You rated this item:"}),e.jsx("p",{"data-loc":"client/src/pages/ItemFeedback.tsx:102",className:"text-sm font-medium",children:p}),e.jsx("div",{"data-loc":"client/src/pages/ItemFeedback.tsx:103",className:"flex items-center gap-2 mt-2",children:a==="relevant"?e.jsxs("span",{"data-loc":"client/src/pages/ItemFeedback.tsx:105",className:"inline-flex items-center gap-1 text-xs text-green-600 bg-green-50 px-2 py-1 rounded",children:[e.jsx(D,{"data-loc":"client/src/pages/ItemFeedback.tsx:106",className:"h-3 w-3"})," Relevant"]}):e.jsxs("span",{"data-loc":"client/src/pages/ItemFeedback.tsx:109",className:"inline-flex items-center gap-1 text-xs text-red-600 bg-red-50 px-2 py-1 rounded",children:[e.jsx(E,{"data-loc":"client/src/pages/ItemFeedback.tsx:110",className:"h-3 w-3"})," Not Relevant"]})})]}),a==="irrelevant"&&g&&e.jsx("div",{"data-loc":"client/src/pages/ItemFeedback.tsx:119",className:"bg-amber-50 border border-amber-200 rounded-lg p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/ItemFeedback.tsx:120",className:"flex items-start gap-3",children:[e.jsx(L,{"data-loc":"client/src/pages/ItemFeedback.tsx:121",className:"h-5 w-5 text-amber-600 mt-0.5"}),e.jsxs("div",{"data-loc":"client/src/pages/ItemFeedback.tsx:122",children:[e.jsx("p",{"data-loc":"client/src/pages/ItemFeedback.tsx:123",className:"text-sm font-medium text-amber-800",children:"Want better results?"}),e.jsx("p",{"data-loc":"client/src/pages/ItemFeedback.tsx:126",className:"text-sm text-amber-700 mt-1",children:"You can refine your monitor settings to get more relevant news items."}),e.jsx(r,{"data-loc":"client/src/pages/ItemFeedback.tsx:129",variant:"outline",size:"sm",className:"mt-3 border-amber-300 text-amber-700 hover:bg-amber-100",onClick:()=>o(`/monitors/${g}/edit`),children:"Edit Monitor Settings"})]})]})}),e.jsxs("div",{"data-loc":"client/src/pages/ItemFeedback.tsx:143",className:"flex flex-col gap-2 pt-2",children:[e.jsx(r,{"data-loc":"client/src/pages/ItemFeedback.tsx:144",onClick:()=>
1o("/dashboard"),className:"w-full",children:"Go to Dashboard"}),e.jsx(r,{"data-loc":"client/src/pages/ItemFeedback.tsx:147",variant:"ghost",onClick:()=>window.close(),className:"w-full",children:"Close this tab"})]})]}),t==="error"&&e.jsx(k,{"data-loc":"client/src/pages/ItemFeedback.tsx:155",children:e.jsx(r,{"data-loc":"client/src/pages/ItemFeedback.tsx:156",onClick:()=>o("/dashboard"),className:"w-full",children:"Go to Dashboard"})})]}),e.jsx("div",{"data-loc":"client/src/pages/ItemFeedback.tsx:164",className:"fixed bottom-4 left-0 right-0 text-center",children:e.jsxs("p",{"data-loc":"client/src/pages/ItemFeedback.tsx:165",className:"text-xs text-muted-foreground",children:["Powered by"," ",e.jsx("a",{"data-loc":"client/src/pages/ItemFeedback.tsx:167",href:"https://uppy.ai",className:"text-primary hover:underline",children:"Uppy.ai"})," ","· The competitor report that comes to you"]})})]})}export{M as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.