"use strict";(self.webpackChunkinfluxdb_ui=self.webpackChunkinfluxdb_ui||[]).push([[271],{50687:(n,e,o)=>{o.r(e),o.d(e,{default:()=>u});var t=o(67294),i=o(46458),a=o(47886),l=o(80500),r=o(45055),s=o(9273),c=o(57870);const u=()=>{const n=(0,a.k6)(),e=(0,i.I0)();return(0,t.useEffect)((()=>{var o;const t=null!==(o=(0,c.J8)("universalLogin"))&&void 0!==o&&o;e((0,s.mc)()),e({type:"USER_LOGGED_OUT"}),(async()=>{if(r.H_){if(console.warn("universalLoginFlagValue: ",t),t)return fetch("/api/env/quartz-login-url").then((async n=>{const e=`${await n.text()}${r.rX}`;console.warn("Redirect to cloud url: ",e),window.location.replace(`${e}`)})).catch((n=>console.error(n))),null;const n=new URL(`${window.location.origin}${r.ih}`).href;window.location.href=n}else{const e=await(0,l.__l)({});if(204!==e.status)throw new Error(e.data.message);n.push("/signin")}})()}),[e,n]),null}}}]);
//# sourceMappingURL=5d97a7abaa.js.map