feat: images clickable
This commit is contained in:
parent
e2adbbb25e
commit
5fa7259e09
@ -60,9 +60,22 @@ export const Images = ({ currentQuestion }: ImagesProps) => {
|
||||
<Box
|
||||
key={index}
|
||||
sx={{
|
||||
cursor: "pointer",
|
||||
borderRadius: "5px",
|
||||
border: `1px solid ${theme.palette.grey2.main}`,
|
||||
}}
|
||||
onClick={(event) => {
|
||||
event.preventDefault();
|
||||
|
||||
updateAnswer(
|
||||
currentQuestion.content.id,
|
||||
currentQuestion.content.variants[index].id
|
||||
);
|
||||
|
||||
if (answer === currentQuestion.content.variants[index].id) {
|
||||
deleteAnswer(currentQuestion.content.id);
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Box sx={{ display: "flex", alignItems: "center", gap: "10px" }}>
|
||||
<Box sx={{ width: "100%", height: "300px" }}>
|
||||
@ -88,18 +101,6 @@ export const Images = ({ currentQuestion }: ImagesProps) => {
|
||||
color: theme.palette.grey2.main,
|
||||
marginTop: "10px",
|
||||
}}
|
||||
onClick={(event) => {
|
||||
event.preventDefault();
|
||||
|
||||
updateAnswer(
|
||||
currentQuestion.content.id,
|
||||
currentQuestion.content.variants[index].id
|
||||
);
|
||||
|
||||
if (answer === currentQuestion.content.variants[index].id) {
|
||||
deleteAnswer(currentQuestion.content.id);
|
||||
}
|
||||
}}
|
||||
value={index}
|
||||
control={
|
||||
<Radio checkedIcon={<RadioCheck />} icon={<RadioIcon />} />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user