1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3251],{65532:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/join/[id]",function(){return t(64569)}])},64569:function(n,e,t){"use strict";t.r(e),t.d(e,{__N_SSP:function(){return u}});var i=t(85893),o=t(68527),l=t(11163),r=t(67294),s=t(16200),u=!0;e.default=function(n){n.id;var e,t=n.nextClassData,u=function(n,e){var t=new Date(n).toDateString(),i=new Date(e).toDateString();return console.log(n,i,"Date1"),console.log(e,i,"Date2"),t===i},a=(0,l.useRouter)(),d=(0,r.useState)(10),c=d[0],v=d[1],h=Intl.DateTimeFormat().resolvedOptions().timeZone;(null===t||void 0===t?void 0:t.studentClassTime)&&(e=new Date(null===t||void 0===t?void 0:t.studentClassTime).toLocaleString("en-GB",{timeZone:h})),(0,r.useEffect)((function(){var n=setInterval((function(){v((function(n){return Math.max(n-1,0)}))}),1e3);return function(){return clearInterval(n)}}),[]),(0,r.useEffect)((function(){var n;0===c&&(null===t||void 0===t?void 0:t.meetingLink)&&""!==(null===t||void 0===t?void 0:t.meetingLink)&&u(new Date,null!==(n=null===t||void 0===t?void 0:t.studentClassTime)&&void 0!==n?n:"")&&a.push(null===t||void 0===t?void 0:t.meetingLink)}),[c,null===t||void 0===t?void 0:t.meetingLink,a]);return(0,i.jsxs)(o.M5,{h:"100vh",flexDir:"column",p:4,children:[(0,i.jsx)(o.xv,{fontSize:"3xl",fontWeight:"bold",textAlign:"center",mb:4,children:"Press Ctrl/\u2318+D to bookmark this page."}),function(n){if(!n)return!1;var e;if(!(null!==(e=n.meetingLink)&&void 0!==e?e:"").trim())return!1;var t,i=new Date,o=null!==(t=null===n||void 0===n?void 0:n.studentClassTime)&&void 0!==t?t:"";return u(i,o)}(t)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o.xv,{fontSize:"xl",fontWeight:"bold",mb:4,children:["You have a class today! Redirecting in... ",c]}),(0,i.jsx)(s.Z,{onClick:function(){a.push((null===t||void 0===t?void 0:t.meetingLink)||"/")},alignSelf:"unset",children:"Join Class Now"})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o.xv,{fontSize:"xl",fontWeight:"bold",mb:4,children:["You don't have a class today."," ",e?(0,i.jsxs)(i.Fragment,{children:["Your next class is on ",e," (",h,")"]}):"Sorry, there are either no classes scheduled or you have an incorrect link."]}),e&&(0,i.jsxs)(o.M5,{flexDir:"column",gap:4,children:[(0,i.jsx)(o.xv,{fontSize:"xl",fontWeight:"bold",mb:4,children:"Check back on the day to join your class."}),(0,i.jsx)(o.xv,{fontSize:"xl",fontWeight:"bold",mb:4,children:"Or visit your dashboard to see your child's schedule."}),(0,i.jsx)(s.Z,{onClick:function(){a.push((null===t||void 0===t?void 0:t.parentMagicUrl)||"/")},alignSelf:"unset",children:"Go to Dashboard"})]})]})]})}}},function(n){n.O(0,[9774,2888,179],(function(){return e=65532,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.