1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[825],{6833:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/with-session",function(){return s(3017)}])},3017:function(e,n,s){"use strict";s.r(n);var i=s(5893),t=s(1261),o=s(3299),l=s(8767),a=s(569),c=s.n(a);n.default=()=>{var e;let{status:n,data:s}=(0,o.useSession)({required:!1}),a=(0,l.useQuery)(["with-session-example",s],async()=>{console.log(s);let e=await c().get("/api/with-session-example");return e.body.content},{enabled:!!s});return"loading"===n?"Loading or not authenticated...":(console.log(a),s)?(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(t.Z,{title:"With Session",children:(0,i.jsxs)("div",{children:[(0,i.jsxs)("h1",{children:["Hello, ","".concat(null!==(e=s.user.name)&&void 0!==e?e:s.user.email)," You can see this because you're logged in."]}),(0,i.jsx)("blockquote",{children:(0,i.jsx)("p",{children:"This example shows usage with React Query and protected api routes."})}),(null==a?void 0:a.data)&&(0,i.jsx)("p",{children:a.data})]})})}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(t.Z,{title:"With Session",children:(0,i.jsxs)("blockquote",{children:[(0,i.jsx)("h1",{children:"Access Denied"}),(0,i.jsxs)("h1",{children:[(0,i.jsxs)("button",{type:"button",onClick:()=>(0,o.signIn)(void 0,{callbackUrl:"/dashboard/portfolio/summary"}),children:[(0,i.jsx)("a",{children:"Login"}),"\xa0"]}),"to see a secret message"]})]})})})}},4654:function(){},3695:function(){}},function(e){e.O(0,[664,569,261,774,888,179],function(){return e(e.s=6833)}),_N_E=e.O()}]);
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.