PageSourceSearch

https://localmusicx.com/assets/verify-delete-event-Bjh5__oT.js

js localmusicx.com collected 2026-10-08 02:55:48 UTC 4,823 bytes, 1 lines download raw bytes

1import{bd as w,u as b,r as y,a as k,b as C,j as e,C as n,d as r,al as f,e as d,f as m,J as o,n as E,B as u,a6 as j,F as D,ar as M,bo as T,m as I,E as P,at as L,p as S}from"./index-D1gByzCh.js";import{S as x}from"./skeleton-Bge-bFHf.js";import{A}from"./arrow-left-C06HTsOD.js";function B(){const v=w(),{token:t,eventId:i}=v,{toast:h}=b(),[g,N]=y.useState(!1),{data:s,isLoading:p,error:l}=k({queryKey:["/api/verify/scraped-event",t,i],enabled:!!t&&!!i}),c=C({mutationFn:async()=>(await S("POST",`/api/verify/delete-event/${t}/${i}`,{reason:"owner_deleted"})).json(),onSuccess:()=>{N(!0),h({title:"Event Deleted",description:"The event has been removed from your pending list"})},onError:a=>{h({title:"Error",description:a instanceof Error?a.message:"Failed to delete event",variant:"destructive"})}});if(!t||!i)return e.jsx("div",{className:"min-h-screen bg-gradient-to-b from-background to-muted/20 flex items-center justify-center p-4",children:e.jsx(n,{className:"max-w-md w-full",children:e.jsxs(r,{className:"text-center",children:[e.jsx(f,{className:"w-12 h-12 mx-auto text-destructive mb-2"}),e.jsx(d,{children:"Missing Information"}),e.jsx(m,{children:"This page requires a valid link from your email."})]})})});if(p)return e.jsx("div",{className:"min-h-screen bg-gradient-to-b from-background to-muted/20 flex items-center justify-center p-4",children:e.jsxs(n,{className:"max-w-md w-full",children:[e.jsxs(r,{className:"text-center",children:[e.jsx(x,{className:"w-12 h-12 rounded-full mx-auto mb-4"}),e.jsx(x,{className:"h-6 w-48 mx-auto mb-2"}),e.jsx(x,{className:"h-4 w-64 mx-auto"})]}),e.jsx(o,{children:e.jsx(x,{className:"h-24 w-full"})})]})});if(l||!s){const a=(l==null?void 0:l.message)||"Invalid or expired link";return e.jsx("div",{className:"min-h-screen bg-gradient-to-b from-background to-muted/20 flex items-center justify-center p-4",children:e.jsxs(n,{className:"max-w-md w-full",children:[e.jsxs(r,{className:"text-center",children:[e.jsx(f,{className:"w-12 h-12 mx-auto text-destructive mb-2"}),e.jsx(d,{children:"Link Invalid"}),e.jsx(m,{children:a})]}),e.jsx(o,{className:"text-center",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"This link may have expired or the event may have already been processed."})})]})})}return g?e.jsx("div",{className:"min-h-screen bg-gradient-to-b from-background to-muted/20 flex items-center justify-center p-4",children:e.jsxs(n,{className:"max-w-md w-full",children:[e.jsxs(r,{className:"text-center",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-green-100 flex items-center justify-center mx-auto mb-4",children:e.jsx(E,{className:"w-8 h-8 text-green-600"})}),e.jsx(d,{className:"text-green-600",children:"Event Deleted"}),e.jsx(m,{children:"The event has been removed from your pending list."})]}),e.jsx(o,{className:"text-center",children:e.jsxs(u,{variant:"outline",onClick:()=>window.location.href=`/verify/review/${t}`,className:"gap-2","data-testid":"button-back-to-review",children:[e.jsx(A,{className:"w-4 h-4"}),"Back to Event Review"]})})]})}):e.jsx("div",{className:"min-h-screen bg-gradient-to-b from-background to-muted/20 flex items-center justify-center p-4",children:e.jsxs(n,{className:"max-w-md w-full",children:[e.jsxs(r,{className:"text-center",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-destructive/10 flex items-center justify-center mx-auto mb-4",children:e.jsx(j,{className:"w-8 h-8 text-destructive"})}),e.jsx(d,{children:"Delete Event?"}),e.jsxs(m,{children:["Are you sure you want to delete this event from ",s.entityName,"?"]})]}),e.jsxs(o,{className:"space-y-4",children:[e.jsxs("div",{className:"p-4 bg-muted rounded-lg",children:[e.jsx("div",{className:"font-semibold text-lg",children:s.title}),e.jsxs("div",{className:"text-sm text-muted-foreground flex items-center gap-2 mt-2",children:[e.jsx(D,{className:"w-4 h-4"}),M(T(s.date),"MMMM d, yyyy"),s.time&&e.jsxs(e.Fragment,{children:[e.jsx(I,{className:"w-4 h-4 ml-2"}),s.time]})]}),s.venue&&e.jsxs("div",{className:"text-sm text-muted-foreground flex items-center gap-2 mt-1",children:[e.jsx(P,{className:"w-4 h-4"}),s.venue]})]}),e.jsx("p",{className:"text-sm text-muted-foreground text-center",children:"This will remove the event from your pending review list. It will not appear in public event listings."}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(u,{variant:"outline",className:"flex-1",onClick:()=>window.location.href=`/verify/review/${t}`,disabled:c.isPending,"data-testid":"button-cancel",children:"Cancel"}),e.jsxs(u,{variant:"destructive",className:"flex-1 gap-2",onClick:()=>c.mutate(),disabled:c.isPending,"data-testid":"button-confirm-delete",children:[c.isPending?e.jsx(L,{className:"w-4 h-4 animate-spin"}):e.jsx(j,{className:"w-4 h-4"}),"Delete Event"]})]})]})]})})}export{B 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.