fix emoji variant scrollbar
This commit is contained in:
parent
7d8ad9a520
commit
9459970624
@ -118,7 +118,6 @@ export const Emoji = ({ currentQuestion }: EmojiProps) => {
|
|||||||
wordBreak: "break-word",
|
wordBreak: "break-word",
|
||||||
height: variant.answer.length <= 60 ? undefined : "60px",
|
height: variant.answer.length <= 60 ? undefined : "60px",
|
||||||
overflow: "auto",
|
overflow: "auto",
|
||||||
lineHeight: "normal",
|
|
||||||
paddingLeft: "45px",
|
paddingLeft: "45px",
|
||||||
"&::-webkit-scrollbar": {
|
"&::-webkit-scrollbar": {
|
||||||
width: "4px",
|
width: "4px",
|
||||||
@ -133,40 +132,40 @@ export const Emoji = ({ currentQuestion }: EmojiProps) => {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (readySend) {
|
if (readySend) {
|
||||||
setReadySend(false)
|
setReadySend(false)
|
||||||
try {
|
|
||||||
|
|
||||||
await sendAnswer({
|
|
||||||
questionId: currentQuestion.id,
|
|
||||||
body: currentQuestion.content.variants[index].extendedText + " " + currentQuestion.content.variants[index].answer,
|
|
||||||
qid: quizId,
|
|
||||||
});
|
|
||||||
|
|
||||||
updateAnswer(
|
|
||||||
currentQuestion.id,
|
|
||||||
currentQuestion.content.variants[index].id,
|
|
||||||
currentQuestion.content.variants[index].points || 0
|
|
||||||
);
|
|
||||||
|
|
||||||
} catch (e) {
|
|
||||||
enqueueSnackbar("ответ не был засчитан");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (answer === currentQuestion.content.variants[index].id) {
|
|
||||||
deleteAnswer(currentQuestion.id);
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
await sendAnswer({
|
await sendAnswer({
|
||||||
questionId: currentQuestion.id,
|
questionId: currentQuestion.id,
|
||||||
body: "",
|
body: currentQuestion.content.variants[index].extendedText + " " + currentQuestion.content.variants[index].answer,
|
||||||
qid: quizId,
|
qid: quizId,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
updateAnswer(
|
||||||
|
currentQuestion.id,
|
||||||
|
currentQuestion.content.variants[index].id,
|
||||||
|
currentQuestion.content.variants[index].points || 0
|
||||||
|
);
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
enqueueSnackbar("ответ не был засчитан");
|
enqueueSnackbar("ответ не был засчитан");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
if (answer === currentQuestion.content.variants[index].id) {
|
||||||
|
deleteAnswer(currentQuestion.id);
|
||||||
|
try {
|
||||||
|
|
||||||
|
await sendAnswer({
|
||||||
|
questionId: currentQuestion.id,
|
||||||
|
body: "",
|
||||||
|
qid: quizId,
|
||||||
|
});
|
||||||
|
|
||||||
|
} catch (e) {
|
||||||
|
enqueueSnackbar("ответ не был засчитан");
|
||||||
|
}
|
||||||
|
}
|
||||||
setReadySend(true)
|
setReadySend(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,7 +176,10 @@ export const Emoji = ({ currentQuestion }: EmojiProps) => {
|
|||||||
}
|
}
|
||||||
label={
|
label={
|
||||||
<Box sx={{ display: "flex", gap: "10px" }}>
|
<Box sx={{ display: "flex", gap: "10px" }}>
|
||||||
<Typography sx={{ wordBreak: "break-word" }}>{variant.answer}</Typography>
|
<Typography sx={{
|
||||||
|
wordBreak: "break-word",
|
||||||
|
lineHeight: "normal",
|
||||||
|
}}>{variant.answer}</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user