Merge branch 'dev' into fix
This commit is contained in:
commit
8b0c679b22
@ -7,7 +7,7 @@ import QuizLogo from "./images/icons/QuizLogo";
|
|||||||
import { useMediaQuery, useTheme } from "@mui/material";
|
import { useMediaQuery, useTheme } from "@mui/material";
|
||||||
import { setIsContactFormOpen } from "../../stores/contactForm";
|
import { setIsContactFormOpen } from "../../stores/contactForm";
|
||||||
import { useUserStore } from "@root/user";
|
import { useUserStore } from "@root/user";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate, Link, } from "react-router-dom";
|
||||||
|
|
||||||
const buttonMenu = ["Меню 1", "Меню 2", "Меню 3", "Меню 4", "Меню 5", "Меню 1", "Меню 2"];
|
const buttonMenu = ["Меню 1", "Меню 2", "Меню 3", "Меню 4", "Меню 5", "Меню 1", "Меню 2"];
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ export default function Component() {
|
|||||||
const userId = useUserStore((state) => state.userId);
|
const userId = useUserStore((state) => state.userId);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const onClick = () => (userId ? navigate("/list") : setIsContactFormOpen(true));
|
const onClick = () => (userId ? navigate("/list") : navigate("/signin"));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SectionStyled
|
<SectionStyled
|
||||||
@ -66,7 +66,7 @@ export default function Component() {
|
|||||||
{/* ))}*/}
|
{/* ))}*/}
|
||||||
{/*</Box>*/}
|
{/*</Box>*/}
|
||||||
<Button
|
<Button
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
sx={{
|
sx={{
|
||||||
color: "black",
|
color: "black",
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
import {Box, Typography, Switch, useTheme, Button, useMediaQuery} from "@mui/material";
|
import {Box, Typography, Switch, useTheme, Button, useMediaQuery} from "@mui/material";
|
||||||
|
|
||||||
import { QuestionsList } from "./QuestionsList";
|
import { QuestionsList } from "./QuestionsList";
|
||||||
@ -10,6 +12,7 @@ export const SwitchBranchingPanel = () => {
|
|||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const isMobile = useMediaQuery(theme.breakpoints.down(660));
|
const isMobile = useMediaQuery(theme.breakpoints.down(660));
|
||||||
const {openBranchingPanel} = useQuestionsStore.getState()
|
const {openBranchingPanel} = useQuestionsStore.getState()
|
||||||
|
console.log(openBranchingPanel)
|
||||||
const ref = useRef()
|
const ref = useRef()
|
||||||
return (
|
return (
|
||||||
<Box sx={{ userSelect: "none", maxWidth: "350px", width: "100%" }}>
|
<Box sx={{ userSelect: "none", maxWidth: "350px", width: "100%" }}>
|
||||||
@ -25,10 +28,10 @@ export const SwitchBranchingPanel = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Switch
|
<Switch
|
||||||
clicked={openBranchingPanel}
|
checked={openBranchingPanel}
|
||||||
onChange={(_, value) => {
|
onChange={
|
||||||
updateOpenBranchingPanel(value)
|
(e) => updateOpenBranchingPanel(e.target.checked)
|
||||||
}}
|
}
|
||||||
sx={{
|
sx={{
|
||||||
width: 50,
|
width: 50,
|
||||||
height: 30,
|
height: 30,
|
||||||
|
@ -253,7 +253,7 @@ export default function EditPage() {
|
|||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
display: openBranchingPanel ? "none" : "display",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: "15px",
|
gap: "15px",
|
||||||
padding: "18px",
|
padding: "18px",
|
||||||
@ -263,10 +263,10 @@ export default function EditPage() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Switch
|
<Switch
|
||||||
clicked={openBranchingPanel}
|
checked={openBranchingPanel}
|
||||||
onChange={(_, value) => {
|
onChange={
|
||||||
updateOpenBranchingPanel(value)
|
(e) => updateOpenBranchingPanel(e.target.checked)
|
||||||
}}
|
}
|
||||||
sx={{
|
sx={{
|
||||||
width: 50,
|
width: 50,
|
||||||
height: 30,
|
height: 30,
|
||||||
|
Loading…
Reference in New Issue
Block a user