Files
Atomcms-edit/frontend/.next/static/chunks/0fj0gql-vdn1q.js
T
2026-05-09 17:32:17 +02:00

1 line
3.7 KiB
JavaScript
Executable File

(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22023,e=>{"use strict";var s=e.i(43476),t=e.i(71645),a=e.i(57688),r=e.i(22016),l=e.i(88589),c=e.i(13642),i=e.i(9165);e.s(["default",0,function(){let[e,n]=(0,t.useState)([]),[d,o]=(0,t.useState)(!0),[x,u]=(0,t.useState)(null);return(0,t.useEffect)(()=>{!async function(){try{let{data:e,error:s}=await i.api.get("/photos");s?u(s):e&&n(e)}catch{u("Er is een fout opgetreden bij het laden van de foto's")}o(!1)}()},[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.default,{}),(0,s.jsx)("main",{className:"bg-background min-h-screen",children:(0,s.jsxs)("div",{className:"max-w-7xl mx-auto p-4 lg:p-6",children:[(0,s.jsx)("div",{className:"bg-surface rounded-lg shadow-card p-4 md:p-6 mb-6",children:(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)("div",{className:"w-12 h-12 rounded-full bg-primary flex items-center justify-center",children:(0,s.jsx)("svg",{className:"w-6 h-6 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-2xl md:text-3xl font-bold text-text-main",children:"Foto's"}),(0,s.jsx)("p",{className:"text-text-muted",children:"Bekijk de mooiste foto's van onze spelers"})]})]})}),d?(0,s.jsx)("div",{className:"bg-surface rounded-lg shadow-card p-8 text-center",children:(0,s.jsx)("p",{className:"text-text-muted",children:"Foto's laden..."})}):x?(0,s.jsx)("div",{className:"bg-surface rounded-lg shadow-card p-8 text-center",children:(0,s.jsx)("p",{className:"text-danger",children:x})}):e.length>0?(0,s.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4",children:e.map(e=>(0,s.jsxs)("div",{className:"bg-surface rounded-lg shadow-card overflow-hidden group",children:[(0,s.jsx)("div",{className:"aspect-square relative bg-background",children:e.url?(0,s.jsx)(a.default,{src:`/storage/${e.url}`,alt:e.caption||"Foto",fill:!0,className:"object-cover group-hover:scale-105 transition-transform duration-300"}):(0,s.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:(0,s.jsx)("svg",{className:"w-12 h-12 text-text-muted",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})})}),(0,s.jsxs)("div",{className:"p-3",children:[e.caption&&(0,s.jsx)("p",{className:"text-sm text-text-main truncate",children:e.caption}),(0,s.jsxs)(r.default,{href:`/profile/${e.user.username}`,className:"flex items-center gap-2 mt-2",children:[(0,s.jsx)("div",{className:"w-6 h-6 rounded-full overflow-hidden bg-background relative flex-shrink-0",children:(0,s.jsx)(a.default,{src:`https://epicnabbo.nl/imaging/?figure=${e.user.look}&headonly=1&direction=2`,alt:e.user.username,fill:!0,className:"object-cover"})}),(0,s.jsx)("span",{className:"text-xs text-text-muted hover:text-primary transition-colors truncate",children:e.user.username})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-1",children:new Date(e.created_at).toLocaleDateString("nl-NL",{day:"numeric",month:"short",year:"numeric"})})]})]},e.id))}):(0,s.jsx)("div",{className:"bg-surface rounded-lg shadow-card p-8 text-center",children:(0,s.jsx)("p",{className:"text-text-muted",children:"Nog geen foto's beschikbaar"})})]})}),(0,s.jsx)(c.default,{})]})}])}]);