import{i as n,u as l,r as u,j as f}from"./react.6693569e.js";import{a as s,s as a,l as h}from"./index.ab3d776b.js";import"./antd.e57bc55d.js";const g=()=>{const r=n(),e=l();return u.exports.useEffect(()=>{const i=t=>{if(e.search||t){let{redirect_uri:o}=h.parse((e.search||"?").slice(1));if(o=o||a.configStore.baseUrl,t){const c=t.includes("?");window.location.href=`${t}${c?"&":"?"}redirect=${encodeURIComponent(o)}`}else window.location.href=o;return}r.push("/login")};(async()=>{let t;try{const o=await s.authApi.logout();t=o==null?void 0:o.redirect,await s.authApi.clearGatewaySession()}catch(o){console.error(o)}finally{a.authStore.clearSession(),i(t)}})()},[]),f("div",{})};export{g as default};
