import{b as p,j as a,aw as j,ax as g,d as x,r as c,p as f,ay as i,az as m,aA as P}from"./index-n-59FgrC.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}]})},R=()=>{const t=x(),[d,l]=c.useState(!1),{data:e,isSuccess:o,isLoading:u}=f.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&&m(n)}l(!0)},[e,o,t]),u||!d?a.jsx(P,{}):a.jsx(S,{})};export{R as default};
