добавлен контейнер Заявка оформлена
This commit is contained in:
@@ -20,14 +20,14 @@ export const MainPart: React.FC = React.memo(() => {
|
||||
const changeContent = useRef(0);
|
||||
const [showBackground, setShowBackground] = useState<boolean>(false);
|
||||
const [planContent, setPlaneContent] = useState<JSX.Element>();
|
||||
const [currentContent, setCurrentContent] = useState<JSX.Element>(
|
||||
const defaultCurrentContent =
|
||||
<ContentContainer
|
||||
titleText="Удаленная демонстрация жилого комплекса"
|
||||
descriptText="Основанная на стриминге технология удаленной демонстрации позволяет познакомиться с жилым комплексом, не посещая офис продаж."
|
||||
onClickButton={() => onClickStartDemo()}
|
||||
textButton='Начать демонстрацию'
|
||||
titleText="Удаленная демонстрация жилого комплекса"
|
||||
descriptText="Основанная на стриминге технология удаленной демонстрации позволяет познакомиться с жилым комплексом, не посещая офис продаж."
|
||||
onClickButton={() => onClickStartDemo()}
|
||||
textButton='Начать демонстрацию'
|
||||
/>
|
||||
);
|
||||
const [currentContent, setCurrentContent] = useState<JSX.Element>(defaultCurrentContent);
|
||||
|
||||
useEffect(() => {
|
||||
// changeContent.current += 1;
|
||||
@@ -100,15 +100,34 @@ export const MainPart: React.FC = React.memo(() => {
|
||||
<PlanContentContainer
|
||||
title="Оформление"
|
||||
date={dateTime}
|
||||
content={<Form onSubmit={(data) => onSubmit(data)} />}
|
||||
content={
|
||||
<Form
|
||||
onSubmit={(data, date) => onSubmit(data, date)}
|
||||
dateInfo={dateTime}
|
||||
/>
|
||||
}
|
||||
isLegend={false}
|
||||
/>
|
||||
)
|
||||
console.log(dateTime)
|
||||
}
|
||||
|
||||
function onSubmit(data: FormData) {
|
||||
function onSubmit(data: FormData, date: string) {
|
||||
setPlaneContent(null);
|
||||
setCurrentContent(
|
||||
<ContentContainer
|
||||
titleText="Просмотр запланирован"
|
||||
descriptText="Дополнительная информация будет отправлена на указанный почтовый адрес или номер телефона."
|
||||
textButton="На главную"
|
||||
onClickButton={() => toMain()}
|
||||
/>
|
||||
)
|
||||
console.log(data, date)
|
||||
}
|
||||
|
||||
function toMain() {
|
||||
setCurrentContent(defaultCurrentContent);
|
||||
disableBackground();
|
||||
}
|
||||
|
||||
function enableBackground() {
|
||||
|
||||
Reference in New Issue
Block a user