PageSourceSearch

https://yeatu.com/assets/notices-DC6DPig_.js

js yeatu.com collected 2026-10-09 23:13:01 UTC 4,333 bytes, 1 lines download raw bytes

1import{u as C,a$ as S,c as $,j as e,S as L,I as P,i as R,R as i,C as o,k as d,Z as m,W as x,E as u,F as E}from"./index-CcDSlRTV.js";import{u as g}from"./use-query-param-BD2r3ile.js";import{P as A}from"./pin-DEotFvWf.js";const h={general:"bg-gray-100 text-gray-700 dark:bg-gray-900/30 dark:text-gray-300",investment:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300",system:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300",event:"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-300"};function F(){const{t:s}=C(),{language:c}=S(),[r,y]=g("q",""),[l,p]=g("category","all"),f=[{key:"all",label:s("notices.categoryAll")},{key:"general",label:s("notices.categoryGeneral")},{key:"investment",label:s("notices.categoryInvestment")},{key:"system",label:s("notices.categorySystem")},{key:"event",label:s("notices.categoryEvent")}],{data:b,isLoading:j}=$({queryKey:["/api/notices"]}),n=b?.filter(t=>{const a=r.toLowerCase(),k=t.title.toLowerCase().includes(a)||t.titleEn&&t.titleEn.toLowerCase().includes(a),w=l==="all"||t.category===l;return k&&w}),N=n?.filter(t=>t.isPinned)||[],v=n?.filter(t=>!t.isPinned)||[];return e.jsxs("div",{className:"min-h-screen bg-background","data-testid":"page-notices",children:[e.jsx("div",{className:"container mx-auto px-4 py-12",children:e.jsxs("div",{className:"max-w-3xl mx-auto",children:[e.jsx("div",{className:"flex items-center justify-center gap-3 mb-2",children:e.jsx("h1",{className:"text-3xl font-bold","data-testid":"text-notices-title",children:s("notices.title")})}),e.jsx("p",{className:"text-center text-muted-foreground mb-8",children:s("notices.subtitle")}),e.jsxs("div",{className:"relative mb-4",children:[e.jsx(L,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-5 w-5 text-muted-foreground"}),e.jsx(P,{placeholder:s("notices.searchPlaceholder"),value:r,onChange:t=>y(t.target.value),className:"pl-10","data-testid":"input-notice-search"})]}),e.jsx("div",{className:"flex md:flex-wrap gap-2 mb-6 overflow-x-auto scrollbar-hide",children:f.map(t=>e.jsx("button",{onClick:()=>p(t.key),className:`flex-shrink-0 px-4 py-2 rounded-full text-sm font-medium transition-colors whitespace-nowrap ${l===t.key?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,"data-testid":`filter-category-${t.key}`,children:t.label},t.key))}),j?e.jsx("div",{className:"space-y-3",children:[...Array(5)].map((t,a)=>e.jsx(R,{className:"h-20 w-full"},a))}):e.jsxs("div",{className:"space-y-3",children:[N.map(t=>e.jsx(i,{href:`/notices/${t.id}`,children:e.jsx(o,{className:"hover-elevate cursor-pointer border-muted bg-muted/30","data-testid":`card-notice-${t.id}`,children:e.jsx(d,{className:"p-4",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(A,{className:"h-4 w-4 text-foreground"}),e.jsx(m,{className:`${h[t.category]} border-0 text-xs`,children:s(`labels.noticeCategory.${t.category}`)})]}),e.jsx("h3",{className:"font-medium truncate",children:x(t,"title")}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:new Date(t.createdAt).toLocaleDateString(c==="ko"?"ko-KR":"en-US")})]}),e.jsx(u,{className:"h-5 w-5 text-muted-foreground flex-shrink-0"})]})})})},t.id)),v.map(t=>e.jsx(i,{href:`/notices/${t.id}`,children:e.jsx(o,{className:"hover-elevate cursor-pointer","data-testid":`card-notice-${t.id}`,children:e.jsx(d,{className:"p-4",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"flex items-center gap-2 mb-1",children:e.jsx(m,{className:`${h[t.category]} border-0 text-xs`,children:s(`labels.noticeCategory.${t.category}`)})}),e.jsx("h3",{className:"font-medium truncate",children:x(t,"title")}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:new Date(t.createdAt).toLocaleDateString(c==="ko"?"ko-KR":"en-US")})]}),e.jsx(u,{className:"h-5 w-5 text-muted-foreground flex-shrink-0"})]})})})},t.id)),n?.length===0&&e.jsx("div",{className:"text-center py-12 text-muted-foreground",children:s(r?"notices.noSearchResults":"notices.noNotices")})]})]})}),e.jsx(E,{})]})}
1export{F 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.