dsql-admin/dsql-app/.local_dist/static/chunks/pages/create-account-7b359cd1beeea50d.js
Benjamin Toby 3ffd2d6777 Updates
2024-12-05 08:03:33 +01:00

1 line
2.8 KiB
JavaScript

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8810],{29222:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/create-account",function(){return a(57029)}])},87291:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var s=a(74848);a(96540);var i=a(620);function n(){return(0,s.jsx)("div",{className:"flex flex-col gap-4 items-center justify-center w-full h-screen p-6 bg-slate-100",children:(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 px-6 py-20 bg-white rounded shadow-sm max-w-2xl w-full",children:[(0,s.jsx)("img",{src:"/images/logo-icon-alt-2.webp",alt:"Datasquirel Logo",width:60}),(0,s.jsx)("div",{className:"w-10 h-10 flex flex-col items-center justify-center",children:(0,s.jsx)(i.A,{width:"25px",position:"relative"})})]})})}},57029:(e,t,a)=>{"use strict";a.r(t),a.d(t,{CreateAccountContext:()=>x,__N_SSP:()=>d,default:()=>m});var s=a(74848),i=a(96540),n=a(93444),l=a(96411),r=a(84147);function c(e){let{query:t,invitingUser:a}=i.useContext(x);return(0,s.jsxs)("section",{className:"flex-col items-center lg:items-center gap-20 p-0",children:[(0,s.jsx)("img",{src:"/images/grid.webp",alt:"Dotted image background",className:"absolute top-0 left-0 w-full h-full object-cover opacity-80 dark:opacity-10 z-0"}),(0,s.jsxs)("div",{className:"w-full lg:w-1/2 max-w-6xl gap-4 flex-col items-center px-4 py-10 bg-white dark:bg-slate-900 relative z-10",children:[(null==a?void 0:a.first_name)&&(0,s.jsxs)("span",{className:"text-xs bg-emerald-100 rounded-full px-4 py-1 mb-4",children:["You have been invited by"," ",(0,s.jsxs)("b",{children:[a.first_name," ",a.last_name," (",a.email,")"]})," ","to manage an account. Please create an account to gain access."]}),(0,s.jsx)("h1",{className:"m-0 text-center text-2xl",children:"Create An Account"}),(0,s.jsx)(r.A,{query:t})]})]})}a(61638),a(620);var o=a(23698),u=a(87291),d=!0;let x=i.createContext({});function m(e){var t;let a="Create Account | Datasquirel",r="Create a FREE account and start storing data.",d=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:a}),(0,s.jsx)("meta",{name:"description",content:r}),(0,s.jsx)(l.A,{pageTitle:a,pageDescription:r,pagePathname:"/"})]}),[m,h]=i.useState(null);return(i.useEffect(()=>{var t;(null===(t=e.query)||void 0===t?void 0:t.invite)&&!e.isAuthCookie&&setTimeout(()=>{(0,o.A)("/api/addAdminUserUser",{method:"POST",body:{query:e.query}},!0).then(t=>{var a;window.location.pathname="/admin/".concat(null===(a=e.user)||void 0===a?void 0:a.id,"/users")})},1e3)},[]),null===(t=e.query)||void 0===t?void 0:t.invite)?(0,s.jsx)(u.A,{}):(0,s.jsx)(n.A,{head:d,children:(0,s.jsx)(x.Provider,{value:{user:m,query:e.query,invitingUser:e.invitingUser},children:(0,s.jsx)("main",{children:(0,s.jsx)(c,{})})})})}}},e=>{var t=t=>e(e.s=t);e.O(0,[9907,4147,636,6593,8792],()=>t(29222)),_N_E=e.O()}]);