PageSourceSearch

https://fitnessprofi.lovable.app/assets/Social-q_BhhsJ2.js

js fitnessprofi.lovable.app collected 2026-10-03 03:31:53 UTC 4,939 bytes, 1 lines download raw bytes

1import{u as o,j as e,z as x,d as u,N as h}from"./index-DfbPMtFZ.js";import{C as i,a as l,b as j}from"./card-DN9U93Ar.js";import{A as f,b as g,a as p}from"./avatar-BJUSXNbd.js";import{e as n,B as N,d as _,U as v,f as b,H as k,k as w,F as S}from"./Footer-DkkU8vMF.js";import{u as A}from"./useSocial-8SE6rbm7.js";import{f as F}from"./formatDistanceToNow-D1nxES6E.js";import{d as z}from"./de-BSRZDHuq.js";import{U as C}from"./UserProfileCard-CEg7RsTs.js";import{S as I}from"./SEOHead-CT9CEd2t.js";import{B as U}from"./Breadcrumbs-Xif6Qk4m.js";import"./Combination-DdoM_vzj.js";import"./shield-gTmsYmaS.js";import"./user-minus-BXoCHMTn.js";import"./dialog-CUfzLZNo.js";import"./textarea-B6myJTMQ.js";import"./label-BPIIdxfs.js";import"./select-BpTHHfDC.js";import"./index-BdQq_4o_.js";import"./index-DL1OQS8_.js";import"./chevron-down-B7uBTmvX.js";import"./useSecurity-BIHYjOoC.js";const y=()=>{const{activities:t,loading:r}=A(),c=o();if(r)return e.jsx("div",{className:"flex justify-center py-8",children:e.jsx(x,{})});if(t.length===0)return e.jsx(i,{children:e.jsxs(l,{className:"text-center py-12",children:[e.jsx(n,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Keine Aktivitäten"}),e.jsx("p",{className:"text-muted-foreground",children:"Folge anderen Nutzern, um ihre Aktivitäten zu sehen."})]})});const d=s=>{switch(s){case"listing_like":return e.jsx(b,{className:"h-4 w-4 text-red-500"});case"user_follow":return e.jsx(v,{className:"h-4 w-4 text-blue-500"});case"listing_create":return e.jsx(_,{className:"h-4 w-4 text-green-500"});default:return e.jsx(n,{className:"h-4 w-4 text-muted-foreground"})}},m=s=>{switch(s.activity_type){case"listing_like":return`hat ${s.listing_title} geliked`;case"user_follow":return`folgt jetzt ${s.target_user_name}`;case"listing_create":return`hat ein neues Inserat erstellt: ${s.listing_title}`;
1default:return"hat eine Aktivität durchgeführt"}};return e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-2xl font-bold",children:"Social Feed"}),t.map(s=>{var a;return e.jsxs(i,{children:[e.jsx(j,{className:"pb-2",children:e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsxs(f,{className:"h-8 w-8",children:[e.jsx(g,{src:s.user_avatar}),e.jsx(p,{children:((a=s.user_name)==null?void 0:a.charAt(0))||"U"})]}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[d(s.activity_type),e.jsx("span",{className:"font-medium",children:s.user_name}),e.jsx("span",{className:"text-muted-foreground",children:m(s)})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:F(new Date(s.created_at),{addSuffix:!0,locale:z})})]})]})}),s.listing_id&&s.listing_title&&e.jsx(l,{className:"pt-0",children:e.jsxs("div",{className:"flex items-center space-x-3 p-3 bg-muted/50 rounded-lg cursor-pointer hover:bg-muted transition-colors",onClick:()=>c(`/buy/${s.listing_id}`),children:[s.listing_image&&e.jsx("img",{src:s.listing_image,alt:s.listing_title,className:"h-12 w-12 object-cover rounded"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"font-medium text-sm",children:s.listing_title}),e.jsx(N,{variant:"secondary",className:"text-xs mt-1",children:"Inserat anzeigen"})]})]})})]},s.id)})]})},ee=()=>{const{user:t,loading:r}=u();return r?e.jsx("div",{className:"flex items-center justify-center min-h-screen",children:e.jsx("div",{className:"animate-spin rounded-full h-32 w-32 border-b-2 border-primary"})}):t?e.jsxs(e.Fragment,{children:[e.jsx(I,{title:"Social Feed - FitnessProfi Marktplatz",description:"Entdecken Sie Aktivitäten und folgen Sie anderen Nutzern im FitnessProfi Marktplatz.",keywords:"social, feed, aktivitäten, folgen, community, fitness"}),e.jsx(k,{}),e.jsxs("div",{className:"container mx-auto p-6 max-w-4xl",children:[e.jsx(U,{items:[{name:"Social",url:"/social",current:!0}]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(w,{className:"h-8 w-8 text-primary"}),e.jsx("h1",{className:"text-3xl font-bold",children:"Social Community"})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[e.jsx("div",{className:"lg:col-span-2",children:e.jsx(y,{})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"Mein Profil"}),e.jsx(C,{userId:t.id}),e.jsxs("div",{className:"mt-6 p-4 bg-muted/50 rounded-lg",children:[e.jsx("h4",{className:"font-medium mb-2",children:"Social Features"}),e.jsxs("ul",{className:"text-sm text-muted-foreground space-y-1",children:[e.jsx("li",{children:"• Folge anderen Nutzern"}),e.jsx("li",{children:"• Like Inserate"}),e.jsx("li",{children:"• Sieh Aktivitäten im Feed"}),e.jsx("li",{children:"• Teile deine eigenen Aktivitäten"})]})]})]})]})]})]}),e.jsx(S,{})]}):e.jsx(h,{to:"/auth",replace:!0})};export{ee 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.