PageSourceSearch

https://ghusse.com/assets/JoinPage-DY7BuUSv.js

js ghusse.com collected 2026-10-02 04:10:40 UTC 1,893 bytes, 1 lines download raw bytes

1import{n as e}from"./rolldown-runtime-DF2fYuay.js";import{c as t,p as n,r,s as i,t as a}from"./react-BsqGp9vZ.js";import{N as o}from"./ui-BrKP0ZMB.js";import{r as s}from"./utils-DEonA5zh.js";import{t as c}from"./button-DS9qN9dD.js";import{a as l,n as u,o as d,t as f}from"./card-L4ff2Kft.js";var p=e(n(),1),m=a(),h=o(function(){let{token:e}=t(),n=i(),{join:a}=s();(0,p.useEffect)(()=>{if(!e){a.setMissingToken();return}return a.fetchInfo(e),()=>a.reset()},[e,a]);let o=(0,p.useCallback)(async()=>{if(!e)return;let t=await a.join(e);t&&(t.status===`already_enrolled`?n(`/`):n(`/lessons/${t.lessonId}/details`))},[e,a,n]);return a.loading?(0,m.jsx)(`main`,{className:`max-w-md mx-auto px-4 py-16 text-center`,children:(0,m.jsx)(`p`,{className:`text-muted-foreground`,children:`Chargement...`})}):a.error||!a.info?(0,m.jsxs)(`main`,{className:`max-w-md mx-auto px-4 py-16`,children:[(0,m.jsx)(l,{variant:`destructive`,className:`mb-4`,children:(0,m.jsx)(d,{children:a.error??`Lien invalide ou expiré`})}),(0,m.jsx)(c,{variant:`outline`,render:(0,m.jsx)(r,{to:`/`}),children:`Retour à l'accueil`})]}):(0,m.jsxs)(`main`,{className:`max-w-md mx-auto px-4 py-16`,children:[(0,m.jsx)(`h1`,{className:`text-2xl font-bold mb-6 text-center`,children:`Rejoindre une leçon`}),(0,m.jsx)(f,{children:(0,m.jsxs)(u,{className:`space-y-4`,children:[(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`p`,{className:`font-medium text-lg`,children:a.info.lesson.title}),a.info.lesson.description&&(0,m.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:a.info.lesson.description})]}),(0,m.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Accès :`,` `,a.info.accessLevel===`readwrite`?`Lecture et écriture`:`Lecture seule`]}),(0,m.jsx)(c,{className:`w-full`,size:`lg`,onClick:o,disabled:a.joining,children:a.joining?`Inscription...`:`Rejoindre cette leçon`})]})})]})});export{h as JoinPage};

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.