PageSourceSearch

https://tutorbuddi.ai/assets/StudyBuddi-Droa714j.js

js tutorbuddi.ai collected 2026-10-05 14:00:00 UTC 4,429 bytes, 1 lines download raw bytes

1import{j as s}from"./ui-Dqaq1iaa.js";import{S as e}from"./StudentHeader-D-GI6CqW.js";import{B as a,K as t,s as r}from"./index-BnJJh0He.js";import{C as i,a as d,b as o,c as l,d as n}from"./card-Bv8W4Zw2.js";import{u as c}from"./useQuery-CzTvuumM.js";import{u as m}from"./vendor-D_xiAuUj.js";import{B as x}from"./book-open-BdpWeFX0.js";import{U as u}from"./upload-CjReBW5Y.js";import{P as h}from"./plus-XgcouN7V.js";import{H as p}from"./history-SJGEolbU.js";import{F as j}from"./file-text-EmIGDVrR.js";import"./RobotIcon-t4AskJqO.js";import"./UsageHeaderIndicator-BGmgVUw5.js";import"./useUsageTracking-5jod-rZM.js";import"./ChoosePlanDialog-Cgeha1ht.js";import"./edgeError-TX0_vJhG.js";import"./loader-circle-Cc0eb4Pc.js";import"./supabase-XAR8dl0U.js";function y(){const y=m(),{data:f,isLoading:g}=c({queryKey:["study-sets"],queryFn:async()=>{const{data:{user:s}}=await r.auth.getUser();if(!s)return[];const{data:e,error:a}=await r.from("study_sets").select("*").eq("student_id",s.id).order("created_at",{ascending:!1}).limit(4);if(a)throw a;return e}});return s.jsxs("div",{className:"min-h-screen bg-bone",children:[s.jsx(e,{backButton:{label:"Dashboard",onClick:()=>y("/dashboard")}}),s.jsxs("main",{className:"container mx-auto px-4 py-8",children:[s.jsxs("div",{className:"mb-8 text-center",children:[s.jsxs("div",{className:"flex items-center justify-center gap-3 mb-4",children:[s.jsx(x,{className:"w-10 h-10 text-amber"}),s.jsx("h1",{className:"font-display text-4xl text-navy",children:"StudyBuddi"})]}),s.jsx("p",{className:"text-navy/60 text-lg",children:"Turn your study materials into flashcards and practice quizzes with AI"})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6 mb-8 max-w-4xl mx-auto",children:[s.jsxs(i,{className:"hover:shadow-lg transition-shadow cursor-pointer",onClick:()=>y("/studybuddi/upload"),children:[s.jsxs(d,{children:[s.jsxs(o,{className:"flex items-center gap-2 font-display",children:[s.jsx(u,{className:"w-5 h-5 text-primary"}),"Upload New Material"]}),s.jsx(l,{children:"Snap a photo of your notes or paste text to create study tools"})]}),s.jsx(n,{children:s.jsxs(a,{className:"w-full",size:"lg",children:[s.jsx(h,{className:"w-4 h-4 mr-2"}),"Get Started"]})})]}),s.jsxs(i,{className:"hover:shadow-lg transition-shadow cursor-pointer",onClick:()=>y("/studybuddi/history"),children:[s.jsxs(d,{children:[s.jsxs(o,{className:"flex items-center gap-2 font-display",children:[s.jsx(p,{className:"w-5 h-5 text-primary"}),"Study History"]}),s.jsx(l,{children:"View and review your flashcard sets and quizzes"})]}),s.jsx(n,{children:s.jsx(a,{variant:"outline",className:"w-full",size:"lg",children:"View History"})})]})]}),f&&f.length>0&&s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold mb-4 font-display",children:"Recent Study Sets"}),s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-4",children:f.map(e=>s.jsxs(i,{className:"hover:shadow-md transition-shadow cursor-pointer",onClick:()=>{"flashcard"===e.type?y(`/studybuddi/flashcards/${e.id}`):y(`/studybuddi/quiz/${e.id}`)},children:[s.jsxs(d,{children:[s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsxs(o,{className:"text-lg flex items-center gap-2 flex-1 font-display",children:["flashcard"===e.type?s.jsx(t,{className:"w-4 h-4 text-amber shrink-0"}):s.jsx(j,{className:"w-4 h-4 text-amber shrink-0"}),e.set_name]}),s.jsx("span",{className:"px-2 py-1 bg-primary/10 text-primary text-xs font-medium rounded-md whitespace-nowrap",children:e.subject})]}),s.jsx(l,{children:"flashcard"===e.type?`${e.total_items} cards`:`${e.total_items} questions`})]}),s.jsxs(n,{children:["flashcard"===e.type&&s.jsxs("div",{className:"text-sm text-muted-foreground",children:["Mastery: ",e.mastery_percentage,"%"]}),"quiz"===e.type&&null!==e.quiz_score&&s.jsxs("div",{className:"text-sm text-muted-foreground",children:["Last Score: ",e.quiz_score,"/10"]})]})]},e.id))})]}),(!f||0===f.length)&&!g&&s.jsx(i,{className:"text-center py-12",children:s.jsxs(n,{children:[s.jsx(x,{className:"w-16 h-16 mx-auto mb-4 text-muted-foreground"}),s.jsx("h3",{className:"text-xl font-semibold mb-2 font-display",children:"No Study Sets Yet"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Upload your first study material to get started!"}),s.jsxs(a,{onClick:()=>y("/studybuddi/upload"),children:[s.jsx(u,{className:"w-4 h-4 mr-2"}),"Upload Now"]})]})})]})]})}export{y 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.