добавлен адаптив главной страницы(первого контейнера)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import './mainPart.css';
|
||||
import { MainPartHeader } from "./mainPartHeader";
|
||||
import { ContentContainer } from "./contentContainer";
|
||||
@@ -17,7 +17,7 @@ type FormData = {
|
||||
}
|
||||
|
||||
export const MainPart: React.FC = React.memo(() => {
|
||||
const changeContent = useRef(0);
|
||||
const [changeContent, setChangeContent] = useState(0);
|
||||
const [showBackground, setShowBackground] = useState<boolean>(false);
|
||||
const [planContent, setPlaneContent] = useState<JSX.Element>();
|
||||
const defaultCurrentContent =
|
||||
@@ -30,7 +30,7 @@ export const MainPart: React.FC = React.memo(() => {
|
||||
const [currentContent, setCurrentContent] = useState<JSX.Element>(defaultCurrentContent);
|
||||
|
||||
useEffect(() => {
|
||||
// changeContent.current += 1;
|
||||
// setChangeContent(changeContent + 1);
|
||||
}, [currentContent])
|
||||
|
||||
function onClickStartDemo() {
|
||||
@@ -122,7 +122,7 @@ export const MainPart: React.FC = React.memo(() => {
|
||||
onClickButton={() => toMain()}
|
||||
/>
|
||||
)
|
||||
console.log(data, date)
|
||||
// console.log(data, date)
|
||||
}
|
||||
|
||||
function toMain() {
|
||||
@@ -143,7 +143,7 @@ export const MainPart: React.FC = React.memo(() => {
|
||||
<MainPartHeader />
|
||||
<TransitionGroup>
|
||||
<CSSTransition
|
||||
key={changeContent.current}
|
||||
key={changeContent}
|
||||
timeout={300}
|
||||
classNames={'change-main-part-content'}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user