PageSourceSearch

https://vjbooking.com/assets/MyArticles-C2a5PzVg.js

js vjbooking.com collected 2026-09-25 10:54:28 UTC 3,754 bytes, 1 lines download raw bytes

1import{u as p,a8 as j,b as g,s as b,j as e,y as N,a0 as f,N as y,P as v,L as r,B as n,ai as w,E as _}from"./index-9vhnchNH.js";import{F as C}from"./Footer-D77kDvdU.js";import{B as L}from"./badge-foxgtZTA.js";import{C as d,d as c}from"./card-BGIN666T.js";import{P as l}from"./plus-C2uljUc3.js";import{C as k}from"./calendar-9czfV6eE.js";import{f as B}from"./format-Dfr7Gy9h.js";import"./useSiteSettings-CKsdeK3F.js";import"./circle-check-jedvEAsO.js";const M={draft:"bg-secondary text-muted-foreground",pending_review:"bg-amber-100 text-amber-800",published:"bg-green-100 text-green-800",rejected:"bg-red-100 text-red-800"},A={draft:"Draft",pending_review:"Pending Review",published:"Published",rejected:"Rejected"},O=()=>{const{user:o,loading:m}=p(),{isContributor:u,artistProfile:a,isLoading:x}=j(),{data:t,isLoading:h}=g({queryKey:["my-articles",a==null?void 0:a.id],queryFn:async()=>{if(!(a!=null&&a.id))return[];const{data:s,error:i}=await b.from("articles").select("id, title, slug, cover_image_url, is_published, status, views_count, created_at, updated_at").eq("author_id",a.id).order("updated_at",{ascending:!1});if(i)throw i;return s},enabled:!!(a!=null&&a.id)});return m||x?e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:e.jsx(N,{className:"w-8 h-8 animate-spin text-primary"})}):!o||!u?e.jsx(f,{to:"/",replace:!0}):e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(y,{}),e.jsx("div",{className:"pt-32 pb-20",children:e.jsxs("div",{className:"container mx-auto px-4 lg:px-8 max-w-4xl",children:[e.jsx(v,{customCrumbs:[{label:"Home",path:"/"},{label:"Dashboard",path:"/dashboard"},{label:"My Articles",path:"/my-articles"}]}),e.jsxs("div",{className:"flex items-center justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"font-display text-3xl md:text-4xl",children:"My Articles"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Write and manage your blog posts"})]}),e.jsx(r,{to:"/my-articles/new",children:e.jsxs(n,{className:"gap-2",children:[e.jsx(l,{className:"w-4 h-4"}),"Write New Post"]})})]}),h?e.jsx("div",{className:"space-y-4",children:[1,2,3].map(s=>e.jsx("div",{className:"h-24 bg-secondary/50 rounded-lg animate-pulse"},s))}):!t||t.length===0?e.jsx(d,{children:e.jsxs(c,{className:"py-16 text-center",children:[e.jsx(w,{className:"w-12 h-12 mx-auto mb-4 text-muted-foreground opacity-30"}),e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"No articles yet"}),e.jsx("p",{className:"text-muted-foreground mb-6",children:"Start writing your first blog post to share with the community."}),e.jsx(r,{to:"/my-articles/new",children:e.jsxs(n,{children:[e.jsx(l,{className:"w-4 h-4 mr-2"}),"Write Your First Post"]})})]})}):e.jsx("div",{className:"space-y-3",children:t.map(s=>e.jsx(r,{to:`/my-articles/${s.id}`,className:"block",children:e.jsx(d,{className:"hover:border-primary/30 transition-colors",children:e.jsxs(c,{className:"p-4 flex items-center gap-4",children:[s.cover_image_url&&e.jsx("img",{src:s.cover_image_url,alt:s.title,className:"w-20 h-14 object-cover rounded-md shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"font-medium truncate",children:s.title}),e.jsxs("div",{className:"flex items-center gap-3 mt-1 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(k,{className:"w-3 h-3"}),B(new Date(s.updated_at),"MMM d, yyyy")]}),s.views_count!=null&&s.views_count>0&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(_,{className:"w-3 h-3"}),s.views_count]})]})]}),e.jsx(L,{className:M[s.status||"draft"],children:A[s.status||"draft"]})]})})},s.id))})]})}),e.jsx(C,{})]})};export{O 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.