import{l as p,j as a,ap as j,aq as g,w as f,r as c,p as m,ar as i,as as x,at as P}from"./index-DTC0Ed21.js";const S=()=>{const{t}=p();return a.jsx(j,{title:t("nodata.noProjects.title"),description:t("nodata.noProjects.description"),buttons:[{buttonText:t("nodata.noProjects.action"),handleClick:g}]})},y=()=>{const t=f(),[d,l]=c.useState(!1),{data:e,isSuccess:o,isLoading:u}=m.endpoints.getProjects.useQueryState();return c.useEffect(()=>{var r;const s=localStorage.getItem(i);if(s){localStorage.removeItem(i),t(decodeURIComponent(s),{replace:!0});return}if(o&&e.list.length>0){const n=(r=e.list.at(0))==null?void 0:r.Id;n&&x(n)}l(!0)},[e,o,t]),u||!d?a.jsx(P,{}):a.jsx(S,{})};export{y as default};
