PageSourceSearch

https://exod.com/assets/Profil-vUAfYwg4.js

js exod.com collected 2026-09-24 13:45:45 UTC 5,619 bytes, 1 lines download raw bytes

1import{a as w,k as y,j as s,H as _,b as k,d as m,T,z as L,E as h,S as D,o as M,G as p,L as x,n as u,F as S}from"./index-D-iJiHwM.js";import{d as z,e as C,m as g,f as j,b,c as v}from"./useWishlist-dcfTALqZ.js";import{a as E}from"./usePurchases-qEDZdfVQ.js";import{T as F}from"./trash-2-NovMJAGo.js";import{S as H}from"./sparkles-BXKLULKO.js";import"./useQuery-DAdxtF78.js";import"./media-Be4hefmh.js";const f=({to:o,img:t,destination:l,title:i,time:n,distance:c,price:e,badge:a,action:r})=>s.jsxs("li",{className:"group relative overflow-hidden rounded-2xl bg-navy-900 ring-1 ring-border/60 shadow-card",children:[s.jsx(x,{to:o,className:"block",children:s.jsxs("div",{className:"relative aspect-[4/3] overflow-hidden",children:[s.jsx("img",{src:t,alt:"",className:"absolute inset-0 h-full w-full object-cover transition-transform duration-500 group-hover:scale-105"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-navy-900 via-navy-900/40 to-transparent"}),a&&s.jsxs("span",{className:`absolute left-3 top-3 inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-[10px] font-bold uppercase tracking-wider text-white ${a.tone==="teal"?"bg-teal-600":"bg-orange-600"}`,children:[s.jsx(H,{className:"h-3 w-3"})," ",a.label]}),s.jsxs("div",{className:"absolute inset-x-0 bottom-0 p-4",children:[l&&s.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider text-orange-400",children:l}),s.jsx("h3",{className:"mt-1 font-mission text-lg text-white",children:i}),s.jsxs("div",{className:"mt-1 flex flex-wrap gap-x-3 text-[11px] font-semibold text-white/80",children:[s.jsx("span",{children:n}),s.jsx("span",{children:"•"}),s.jsx("span",{children:c}),e&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"•"}),s.jsx("span",{children:e})]})]})]})]})}),r]}),B=()=>{const{pathname:o}=w(),{user:t,loading:l}=y(),i=E(),n=z(),c=C();return s.jsxs("div",{className:"min-h-screen bg-cream-50",children:[s.jsxs(_,{children:[s.jsx("title",{children:"Mon profil — exod — Marchez pour sauver le patrimoine"}),s.jsx("meta",{name:"description",content:"Accédez à vos missions, vos achats et votre wishlist exod depuis votre profil."}),s.jsx("link",{rel:"canonical",href:`https://exod.com${o}`}),s.jsx("meta",{name:"robots",content:"noindex"})]}),s.jsx(k,{}),s.jsxs("main",{className:"container !px-5 sm:!px-8 md:!px-12 pt-28 pb-20",children:[s.jsx("h1",{className:"font-mission text-3xl uppercase text-navy-900 md:text-4xl",children:"Mon profil"}),(t==null?void 0:t.email)&&s.jsx("p",{className:"mt-2 text-navy-900/70",children:t.email}),l?s.jsx("div",{className:"mt-12 flex justify-center",children:s.jsx(m,{className:"h-6 w-6 animate-spin text-navy-900/60"})}):t?s.jsxs(T,{defaultValue:"achats",className:"mt-8",children:[s.jsxs(L,{className:"bg-navy-900/5",children:[s.jsxs(h,{value:"achats",className:"gap-2",children:[s.jsx(D,{className:"h-4 w-4"})," Mes achats"]}),s.jsxs(h,{value:"wishlist",className:"gap-2",children:[s.jsx(M,{className:"h-4 w-4"})," Ma wishlist"]})]}),s.jsx(p,{value:"achats",className:"mt-6",children:i.isLoading?s.jsx("div",{className:"mt-12 flex justify-center",children:s.jsx(m,{className:"h-6 w-6 animate-spin text-navy-900/60"})}):!i.data||i.data.length===0?s.jsxs("div",{className:"rounded-3xl border border-border bg-card p-8 text-center",children:[s.jsx("p",{className:"text-navy-900/80",children:"Vous n'avez pas encore débloqué de mission."}),s.jsx(x,{to:"/#missions",className:"mt-4 inline-flex rounded-full bg-orange-600 px-6 py-3 text-sm font-bold text-white shadow-orange hover:bg-orange-700",children:"Découvrir les missions"})]}):s.jsx("ul",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:i.data.map(e=>{const a=e.image_main??e.image_personnage??g,r=j(e.price_cents);return s.jsx(f,{to:`/missions/${e.slug}`,img:a,destination:e.destination,title:e.title,time:b(e.time_estimate_min),distance:v(e.distance_estimate_m),price:r,badge:{label:"Débloquée",tone:"teal"}},e.id)})})}),s.jsx(p,{value:"wishlist",className:"mt-6",children:n.isLoading?s.jsx("div",{className:"mt-12 flex justify-center",children:s.jsx(m,{className:"h-6 w-6 animate-spin text-navy-900/60"})}):!n.data||n.data.length===0?s.jsxs("div",{className:"rounded-3xl border border-border bg-card p-8 text-center",children:[s.jsx("p",{className:"text-navy-900/80",children:"Aucune mission dans votre wishlist pour le moment."}),s.jsx(x,{to:"/#missions",className:"mt-4 inline-flex rounded-full bg-orange-600 px-6 py-3 text-sm font-bold text-white shadow-orange hover:bg-orange-700",children:"Découvrir les missions"})]}):s.jsx("ul",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:n.data.map(e=>{const a=e.mission;if(!a)return null;const r=a.image_main??a.image_personnage??g,N=j(a.price_cents);return s.jsx(f,{to:`/missions/${a.slug}`,img:r,destination:a.destination,title:a.title,time:b(a.time_estimate_min),distance:v(a.distance_estimate_m),price:N,action:s.jsx("button",{type:"button",onClick:()=>c.mutate(e.mission_id,{onSuccess:()=>
1u.success("Retirée de votre wishlist"),onError:d=>u.error((d==null?void 0:d.message)??"Suppression impossible")}),"aria-label":"Retirer de la wishlist",className:"absolute right-3 top-3 inline-flex h-9 w-9 items-center justify-center rounded-full bg-white/90 text-navy-900 shadow-soft transition-colors hover:bg-white",children:s.jsx(F,{className:"h-4 w-4"})})},e.id)})})})]}):s.jsx("div",{className:"mt-12 rounded-3xl border border-border bg-card p-8 text-center",children:s.jsx("p",{className:"text-navy-900/80",children:"Connectez-vous pour accéder à votre profil."})})]}),s.jsx(S,{})]})};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.