"use strict";(()=>{vare={};e.id=6309,e.ids=[6309],e.modules={34313:(e,t,r)=>{r.r(t),r.d(t,{config:()=>_,default:()=>v,getServerSideProps:()=>M,getStaticPaths:()=>q,getStaticProps:()=>f,reportWebVitals:()=>j,routeModule:()=>W,unstable_getServerProps:()=>w,unstable_getServerSideProps:()=>C,unstable_getStaticParams:()=>y,unstable_getStaticPaths:()=>D,unstable_getStaticProps:()=>A});vara={};r.r(a),r.d(a,{DashboardContext:()=>P,default:()=>b,getServerSideProps:()=>h});vars=r(63865),i=r(9455),n=r(30671),o=r(49407),u=r(89600),d=r(8732),l=r(82015),p=r.n(l),c=r(95222),g=r(20048),x=r.n(g),S=r(43001),m=r(34033);letP=p().createContext({});functionb({user:e,databases:t,metrics:r}){leta=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,d.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}),[s,i]=p().useState(null);return(0,d.jsx)(c.A,{head:a,user:e,children:(0,d.jsxs)(P.Provider,{value:{user:e,databases:t,targetDatabase:s,setTargetDatabase:i,metrics:r},children:[(0,d.jsx)(S.A,{}),(0,d.jsx)(m.A,{targetDatabase:s})]})})}asyncfunctionh({req:e,res:t,query:r}){leta=awaitx()(e,t);returna?.logged_in_status?{redirect:{destination:`/admin/${a.id}`,permanent:!1}}:{redirect:{destination:"/login",permanent:!1}}}letv=(0,n.M)(a,"default"),f=(0,n.M)(a,"getStaticProps"),q=(0,n.M)(a,"getStaticPaths"),M=(0,n.M)(a,"getServerSideProps"),_=(0,n.M)(a,"config"),j=(0,n.M)(a,"reportWebVitals"),A=(0,n.M)(a,"unstable_getStaticProps"),D=(0,n.M)(a,"unstable_getStaticPaths"),y=(0,n.M)(a,"unstable_getStaticParams"),w=(0,n.M)(a,"unstable_getServerProps"),C=(0,n.M)(a,"unstable_getServerSideProps"),W=news.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin",pathname:"/admin",bundlePath:"",filename:""},components:{App:u.default,Document:o.default},userland:a})},40361:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{e.exports=require("next/head")},82015:e=>{e.exports=require("react")},22326:e=>{e.exports=require("react-dom")},8732:e=>{e.exports=require("react/jsx-runtime")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},81630:e=>{e.exports=require("http")},33873:e=>{e.exports=require("path")}};vart=require("../webpack-runtime.js");t.C(e);varr=e=>t(t.s=e),a=t.X(0,[883,9821,9600,7070,3460,3247],()=>r(34313));module.exports=a})();