2025-01-13 08:00:21 +00:00
|
|
|
"use strict";(()=>{var e={};e.id=6257,e.ids=[6257],e.modules={25767:(e,t,r)=>{r.r(t),r.d(t,{config:()=>M,default:()=>b,getServerSideProps:()=>v,getStaticPaths:()=>j,getStaticProps:()=>f,reportWebVitals:()=>_,routeModule:()=>E,unstable_getServerProps:()=>y,unstable_getServerSideProps:()=>L,unstable_getStaticParams:()=>A,unstable_getStaticPaths:()=>w,unstable_getStaticProps:()=>q});var s={};r.r(s),r.d(s,{default:()=>h,getServerSideProps:()=>P});var a=r(63865),i=r(9455),o=r(30671),n=r(5583),l=r(19796),u=r(8732),d=r(82015),c=r.n(d),p=r(61197),g=r(40778),x=r(46169),m=r(16757);function S(){let[e,t]=c().useState(null),[r,s]=c().useState(!1),[a,i]=c().useState(0);return(0,u.jsxs)(c().Fragment,{children:[(0,u.jsxs)("div",{className:"w-full justify-between",children:[(0,u.jsx)("h2",{className:"text-xl m-0",children:"Error Logs"}),(0,u.jsx)("div",{children:(0,u.jsxs)("button",{onClick:e=>{window.confirm("Clear Error Logs?")&&(s(!0),(0,x.A)("/api/admin/clearErrorLogs",{method:"POST"}).then(e=>{console.log(e),i(e=>e+1)}),setTimeout(()=>{s(!1)},2e3))},className:"outlined gray relative",children:[r&&(0,u.jsx)(m.A,{width:"20px"}),"Clear Error Log"]})})]}),(0,u.jsxs)("section",{className:"paper",children:[e&&(0,u.jsx)("p",{dangerouslySetInnerHTML:{__html:e||"No Log"}}),!e&&(0,u.jsx)(m.A,{position:"relative",width:"25px"})]})]})}function h({user:e,data:t}){let r=(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,u.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,u.jsx)(g.A,{head:r,user:e,children:(0,u.jsx)(S,{})})}async function P({req:e,res:t,query:r}){let s=await (0,p.A)(e);return s?.logged_in_status?{props:{user:s}}:{redirect:{destination:"/su/login",permanent:!1}}}let b=(0,o.M)(s,"default"),f=(0,o.M)(s,"getStaticProps"),j=(0,o.M)(s,"getStaticPaths"),v=(0,o.M)(s,"getServerSideProps"),M=(0,o.M)(s,"config"),_=(0,o.M)(s,"reportWebVitals"),q=(0,o.M)(s,"unstable_getStaticProps"),w=(0,o.M)(s,"unstable_getStaticPaths"),A=(0,o.M)(s,"unstable_getStaticParams"),y=(0,o.M)(s,"unstable_getServerProps"),L=(0,o.M)(s,"unstable_getServerSideProps"),E=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/su/error-logs",pathname:"/su/error-logs",bundlePath:"",filename:""},components:{App:l.default,Document:n.default},userland:s})},13893:e=>{e.exports=require("@moduletrace/datasquirel/dist/client/fetch")},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")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},33873:e=>{e.exports=require("path")}};var t=require("../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[883,9821,9796,6622],()=>r(25767));module.exports=s})();
|