(self.webpackChunksite_front=self.webpackChunksite_front||[]).push([[505],{91505:function(t,e,r){"use strict";r.r(e);var n=r(67294),o=r(80993),i=r(46802);function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}e.default=function(t){var e,r,l=t.history,s=(e=(0,o.f4)(),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,l=t[Symbol.iterator]();!(n=(a=l.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==l.return||l.return()}finally{if(o)throw i}}return r}}(e,r)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=(s[0],s[1]);return n.useEffect((function(){var t=location.search,e="";if(t.split("?").length>0)for(var r=0;r<t.split("?")[1].split("&").length;r++){var n=t.split("?")[1].split("&")[r].split("=");if("token"===n[0]&&n[1]){e=n[1];break}}u({user:"",password:"",rember_password:!1},{token:e}).then((function(t){i.Z.setItem("uid",t.uid),i.Z.setItem("token",t.token),i.Z.setItem("username",t.username),i.Z.setItem("refresh_token",t.refresh_token),l.push("/")})).catch((function(){localStorage.clear(),location.href="/login"}))}),[]),null}}}]);