Где дизайн

This commit is contained in:
VITALY-VORON
2023-08-24 18:02:01 +03:00
parent 390d42119f
commit 5a7f2b3c37
11 changed files with 211 additions and 92 deletions

View File

@ -1,10 +1,31 @@
import React from 'react';
import React, {useState} from 'react';
import './App.css';
import Start from './components/Start/Start';
import Second from './components/Second/Second';
import Tinder from './components/Tinder/Tinder';
function App() {
const [buttonValue, setButtonValue] = useState("");
const handleButtonValue = (value) => {
setButtonValue(value);
};
let content = null;
switch (buttonValue) {
case '/':
content = <Second getValue={handleButtonValue}/>
break;
case '/tinder':
content = <Tinder />
break;
default: content = <Start getValue={handleButtonValue}/>
}
return (
<div className="App">
{content}
</div>
);
}

View File

@ -0,0 +1,22 @@
import React from "react"
const Second = (props) => {
const route = props.getValue
return (
<div style={{
display: 'flex',
flexDirection: 'column',
alignContent: 'center',
flexWrap: 'wrap',
justifyContent: 'space-between',
height: '95vh',
}}>
<span>Пройти опрос</span>
<button onClick={() => route('/tinder')}>Tinder</button>
</div>
)
}
export default Second;

View File

@ -0,0 +1,22 @@
import React from "react";
const Start = (props) => {
const route = props.getValue;
return (
<div style={{
display: 'flex',
flexDirection: 'column',
alignContent: 'center',
flexWrap: 'wrap',
justifyContent: 'space-between',
height: '95vh',
}}>
<img src="" alt="Icon"/>
<button onClick={() => route('/')}>Начать</button>
</div>
)
};
export default Start;

View File