completed with refactoring contact form
This commit is contained in:
parent
afb641c382
commit
8436c4668e
@ -99,7 +99,10 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
||||
const sessions = JSON.parse(localStorage.getItem("sessions") || "{}");
|
||||
localStorage.setItem(
|
||||
"sessions",
|
||||
JSON.stringify({ ...sessions, [quizId]: new Date().getTime() })
|
||||
JSON.stringify({
|
||||
...sessions,
|
||||
[quizId]: new Date().getTime()
|
||||
})
|
||||
);
|
||||
} catch (e) {
|
||||
enqueueSnackbar("ответ не был засчитан");
|
||||
@ -173,6 +176,7 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
||||
|
||||
setFire(false);
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
//@ts-ignore
|
||||
const YM = window?.ym;
|
||||
@ -227,7 +231,8 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
||||
borderRadius: "4px",
|
||||
height: isMobile ? "100%" : "auto",
|
||||
minHeight: "100%",
|
||||
display: isMobile ? undefined : "flex",
|
||||
display: "flex",
|
||||
flexDirection: isMobile ? "column" : "row",
|
||||
background:
|
||||
settings.cfg.design && !isMobile
|
||||
? undefined
|
||||
@ -236,7 +241,7 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
||||
>
|
||||
<ContactTextBlock settings={settings}/>
|
||||
<Box sx={{
|
||||
flexGrow: 0,
|
||||
flexGrow: isMobile ? 1 : 0,
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
@ -250,7 +255,8 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
||||
alignItems: isMobile ? undefined : "center",
|
||||
justifyContent: "center",
|
||||
flexDirection: "column",
|
||||
p: isMobile ? "0 20px" : isTablet ? "0px 40px 30px 60px" : "125px 60px 30px 60px",
|
||||
p: isMobile ? "0 20px" : isTablet ? "105px 40px 0 60px" : "105px 60px 0 60px",
|
||||
margin: isMobile ? "0" : "auto 0",
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
@ -289,10 +295,15 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
||||
colorIcon={theme.palette.primary.main}
|
||||
sx={{marginRight: "0"}}
|
||||
/>
|
||||
<Typography sx={{ color: theme.palette.text.primary, lineHeight: "18.96px" }} fontSize={"16px"} >
|
||||
<Typography sx={{
|
||||
color: theme.palette.text.primary,
|
||||
lineHeight: "18.96px"
|
||||
}} fontSize={"16px"}>
|
||||
С 
|
||||
<Link href={"https://shub.pena.digital/ppdd"} target="_blank">
|
||||
Положением об обработке персональных данных{" "}
|
||||
<Link href={"https://shub.pena.digital/ppdd"}
|
||||
target="_blank">
|
||||
Положением об обработке персональных
|
||||
данных{" "}
|
||||
</Link>
|
||||
 и 
|
||||
<Link
|
||||
@ -338,6 +349,7 @@ export const ContactForm = ({ currentQuestion, onShowResult }: Props) => {
|
||||
mb: isMobile ? "30px" : isTablet ? "40px" : "50px",
|
||||
gap: "10px",
|
||||
textDecoration: "none",
|
||||
margitTop: "auto",
|
||||
}}
|
||||
>
|
||||
<NameplateLogo
|
||||
|
@ -14,7 +14,7 @@ export const ContactTextBlock: FC<ContactTextBlockProps> = ({settings}) => {
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
flexGrow: 1,
|
||||
flexGrow: isMobile ? 0 : 1,
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
alignItems: "center",
|
||||
|
@ -24,6 +24,8 @@ export const CountrySelector:FC<CountrySelectorProps> = ({setMask}) => {
|
||||
PaperProps: {
|
||||
style: {
|
||||
backgroundColor: theme.palette.background.default,
|
||||
borderRadius: '12px',
|
||||
scrollbarWidth: "none",
|
||||
},
|
||||
},
|
||||
}}
|
||||
@ -55,7 +57,8 @@ export const CountrySelector:FC<CountrySelectorProps> = ({setMask}) => {
|
||||
}}
|
||||
>
|
||||
{Object.keys(phoneMasksByCountry).map((countryCode) => {
|
||||
return <MenuItem value={countryCode}>{phoneMasksByCountry[countryCode][0]}</MenuItem>
|
||||
return <MenuItem
|
||||
value={countryCode}>{phoneMasksByCountry[countryCode][0]}</MenuItem>
|
||||
})}
|
||||
</Select>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user