(this.webpackJsonpchess=this.webpackJsonpchess||[]).push([[4],{28:function(e,t,n){},39:function(e,t,n){"use strict";n.r(t);var c=n(0),a=n.n(c),o=n(10),l=n.n(o),r=(n(28),n(16)),i=n(1),s=n(17),u=[{path:"/",exact:!0,component:Object(c.lazy)((function(){return Promise.all([n.e(1),n.e(13)]).then(n.bind(null,251))}))}],m={"":[],"616d6412f3211f77d30bdc52":[{path:"/home",exact:!0,component:Object(c.lazy)((function(){return Promise.all([n.e(0),n.e(1),n.e(10)]).then(n.bind(null,252))}))},{path:"/enrollments",exact:!0,component:Object(c.lazy)((function(){return Promise.all([n.e(0),n.e(1),n.e(3),n.e(20),n.e(9)]).then(n.bind(null,253))}))},{path:"/master",exact:!1,component:Object(c.lazy)((function(){return Promise.all([n.e(0),n.e(1),n.e(17),n.e(7)]).then(n.bind(null,248))}))},{path:"/dashboard",exact:!1,component:Object(c.lazy)((function(){return Promise.all([n.e(0),n.e(1),n.e(3),n.e(11)]).then(n.bind(null,257))}))},{path:"/pgn-grid",exact:!0,component:Object(c.lazy)((function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(8)]).then(n.bind(null,254))}))}],"616d6437f3211f77d30bdc54":[{path:"/home",exact:!0,component:Object(c.lazy)((function(){return Promise.all([n.e(0),n.e(12)]).then(n.bind(null,258))}))},{path:"/games/:category",exact:!0,component:Object(c.lazy)((function(){return Promise.all([n.e(0),n.e(1),n.e(18),n.e(19)]).then(n.bind(null,255))}))},{path:"/games/game/pgn/:assignmentId",exact:!0,component:Object(c.lazy)((function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(15)]).then(n.bind(null,259))}))},{path:"/games/assignments/pgn/:assignmentId",exact:!0,component:Object(c.lazy)((function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(14)]).then(n.bind(null,260))}))},{path:"/games/revision/pgn/:assignmentId",exact:!0,component:Object(c.lazy)((function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(16)]).then(n.bind(null,140))}))}]},b=n(3),p=function(){var e,t=Object(i.g)(),n=Object(c.useState)(!1),a=Object(r.a)(n,2),o=a[0],l=a[1],p=localStorage.getItem("role")||"";localStorage.setItem("role",p);var h=function(){localStorage.getItem("token")?l(!0):(t.replace("/"),localStorage.clear(),p="",l(!1))};return Object(c.useEffect)((function(){console.log(u),h(),t.listen((function(e){"/"!==e.pathname?h():(l(!1),p="")}))}),[]),Object(b.jsxs)(b.Fragment,{children:[Object(b.jsx)(c.Suspense,{fallback:Object(b.jsx)("div",{children:"Loading..."}),children:Object(b.jsxs)(i.d,{children:[null===u||void 0===u?void 0:u.map((function(e){return Object(b.jsx)(i.b,{exact:e.exact,path:e.path,component:e.component},e.path)})),o&&(null===(e=m[p])||void 0===e?void 0:e.map((function(e){return Object(b.jsx)(i.b,{exact:e.exact,path:e.path,component:e.component},e.path)}))),o&&Object(b.jsx)(i.b,{path:"*",children:Object(b.jsx)(i.a,{to:"/home"})})]})}),Object(b.jsx)(s.a,{})]})},h=n(11);n(37),n(38);l.a.render(Object(b.jsx)(a.a.StrictMode,{children:Object(b.jsx)(h.a,{children:Object(b.jsx)(p,{})})}),document.getElementById("root"))}},[[39,5,6]]]);
//# sourceMappingURL=main.a6d2fc8e.chunk.js.map