Spaces:
Running
Running
Download frontend/src/components/admin/QuestionsList.jsx from banu4prasad/Gateprep: direct link, hf CLI and curl.
- Browser
- Download file 682 Bytes
-
https://huggingface.co/spaces/banu4prasad/Gateprep/resolve/main/frontend/src/components/admin/QuestionsList.jsx
- Command line
-
hf download hf://spaces/banu4prasad/Gateprep/frontend/src/components/admin/QuestionsList.jsx
-
curl -L -o QuestionsList.jsx https://huggingface.co/spaces/banu4prasad/Gateprep/resolve/main/frontend/src/components/admin/QuestionsList.jsx
682 Bytes
| import EmptyQuestionsState from './EmptyQuestionsState' | |
| import QuestionCard from './QuestionCard' | |
| export default function QuestionsList({ questions, onOpenJson, onOpenManual, onDelete, onUpdate, onUploadImage, onDeleteImage }) { | |
| if (questions.length === 0) { | |
| return <EmptyQuestionsState onOpenJson={onOpenJson} onOpenManual={onOpenManual} /> | |
| } | |
| return ( | |
| <> | |
| {questions.map((question, idx) => ( | |
| <QuestionCard | |
| key={question.id} | |
| q={question} | |
| idx={idx} | |
| onDelete={onDelete} | |
| onUpdate={onUpdate} | |
| onUploadImage={onUploadImage} | |
| onDeleteImage={onDeleteImage} | |
| /> | |
| ))} | |
| </> | |
| ) | |
| } | |