PageSourceSearch

https://letsknock.ai/app/assets/SessionView-Dcr5y6p3.js

js letsknock.ai collected 2026-10-05 15:23:13 UTC 2,244 bytes, 1 lines download raw bytes

1import{j as t}from"./index-DJUqd4bY.js";import{h as f,b as r}from"./router-DCC30OjP.js";import{S as x}from"./ScorecardView-CjUwJaPP.js";const b="https://backoffice.letsknock.ai",j=()=>{const{sessionId:i}=f(),n=new URLSearchParams(window.location.search).get("viewToken"),[d,p]=r.useState(null),[h,l]=r.useState(!0),[m,u]=r.useState(null);return r.useEffect(()=>{if(!i||!n){u("Invalid link."),l(!1);return}fetch(`${b}/api/v1/courses/sessions/${i}/view?viewToken=${encodeURIComponent(n)}`,{headers:{Accept:"application/json"}}).then(e=>{if(!e.ok)throw new Error("Session not found or token expired.");return e.json()}).then(e=>{const o=e.course,a=e.section_id?o.sections?.find(c=>c.id===e.section_id):null,s=e.data;p({course:o,session:e,id:e.id,timestamp:e.created_at,overallScore:e.score||s?.overallScore||0,passedPointIds:s?.passedPointIds??[],failedPointIds:s?.failedPointIds??[],feedback:s?.feedback||"",scenarioTitle:a?a.title+" - Section Drill":o?.title??"Session",sessionType:e.session_type,transcript:s?.transcript??[],phaseScores:s?.phaseScores,deliveryQuality:s?.deliveryQuality,isDrill:!!a,drillPhaseId:a?.id,drillPointIds:a?.steps?.map(c=>c.id),sessionDuration:e.duration,cadence:s?.cadence,personalityHandling:s?.personalityHandling,toneMirroring:s?.toneMirroring,conversationSummary:s?.conversationSummary})}).catch(e=>{u(e.message||"Failed to load session.")}).finally(()=>l(!1))},[i,n]),h?t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-aqua-bg",children:t.jsx("div",{className:"inline-block w-8 h-8 border-2 border-tropical-teal/30 border-t-tropical-teal rounded-full animate-spin"})}):m||!d?t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-aqua-bg",children:t.jsxs("div",{className:"bg-white rounded-2xl shadow-sm border border-slate-200/60 p-8 max-w-md text-center",children:[t.jsx("p",{className:"text-lg font-bold text-prussian-blue mb-2",children:"Session Not Found"}),t.jsx("p",{className:"text-sm text-slate-500",children:m||"This session could not be loaded."})]})}):t.jsx("div",{className:"min-h-screen bg-aqua-bg",children:t.jsx("div",{className:"container mx-auto p-4 md:p-6",children:t.jsx(x,{scorecard:d,onClose:()=>window.history.back()})})})};export{j as default};

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.