mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: use editable workaround for blocks
This commit is contained in:
parent
a05b298c91
commit
21f1f2fd94
10 changed files with 36 additions and 14 deletions
|
|
@ -4,6 +4,7 @@ import { twJoin, twMerge } from 'tailwind-merge'
|
|||
import React from "react";
|
||||
import { BadgeHelp, Check, Info, Minus, MoreVertical, Plus, RefreshCcw, X } from "lucide-react";
|
||||
import ReactConfetti from "react-confetti";
|
||||
import { useEditorProvider } from "@components/Contexts/Editor/EditorContext";
|
||||
|
||||
interface Answer {
|
||||
answer_id: string;
|
||||
|
|
@ -22,7 +23,8 @@ function QuizBlockComponent(props: any) {
|
|||
const [userAnswers, setUserAnswers] = React.useState([]) as [any[], any];
|
||||
const [submitted, setSubmitted] = React.useState(false) as [boolean, any];
|
||||
const [submissionMessage, setSubmissionMessage] = React.useState("") as [string, any];
|
||||
const isEditable = props.extension.options.editable;
|
||||
const editorState = useEditorProvider() as any;
|
||||
const isEditable = editorState.isEditable;
|
||||
|
||||
const handleAnswerClick = (question_id: string, answer_id: string) => {
|
||||
// if the quiz is submitted, do nothing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue