mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
buttons for canvas preview
This commit is contained in:
@@ -19,7 +19,6 @@ export default function EditQuiz({
|
||||
const updateQuizMutation = useUpdateQuizMutation();
|
||||
const [quizText, setQuizText] = useState(quizMarkdownUtils.toMarkdown(quiz));
|
||||
const [error, setError] = useState("");
|
||||
// console.log(quizText);
|
||||
|
||||
useEffect(() => {
|
||||
const delay = 500;
|
||||
@@ -51,11 +50,16 @@ export default function EditQuiz({
|
||||
{quiz.name}
|
||||
<div className="columns-2 min-h-0 flex-1">
|
||||
<MonacoEditor value={quizText} onChange={setQuizText} />
|
||||
<div>
|
||||
<div className="h-full">
|
||||
<div className="text-red-300">{error && error}</div>
|
||||
<QuizPreview quiz={quiz} />
|
||||
</div>
|
||||
</div>
|
||||
<div className="p-5">
|
||||
<button className="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
|
||||
Add to canvas....
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import { markdownToHTMLSafe } from "@/services/htmlMarkdownUtils";
|
||||
|
||||
export default function QuizPreview({ quiz }: { quiz: LocalQuiz }) {
|
||||
return (
|
||||
<div>
|
||||
<div style={{ overflow: "scroll", height: "100%" }}>
|
||||
<div className="columns-2">
|
||||
<div className="text-end">Name</div>
|
||||
<div>{quiz.name}</div>
|
||||
@@ -47,6 +47,15 @@ export default function QuizPreview({ quiz }: { quiz: LocalQuiz }) {
|
||||
question={question}
|
||||
/>
|
||||
))}
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user