нормальные роуты
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import React from "react"
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import './style.css'
|
||||
import Icon from './images/Vector.svg'
|
||||
|
||||
@ -6,7 +7,8 @@ import Icon from './images/Vector.svg'
|
||||
const Second = (props) => {
|
||||
|
||||
const route = props.getValue;
|
||||
|
||||
const tinder = useNavigate();
|
||||
const main = useNavigate();
|
||||
return (
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
@ -41,8 +43,8 @@ const Second = (props) => {
|
||||
gap:15,
|
||||
alignItems:'center',
|
||||
}}>
|
||||
<button className="btn_first" onClick={() => route('/tinder')}>Давайте!</button>
|
||||
<button className="btn_second" onClick={() => route('/main')}>Пропустить</button>
|
||||
<button className="btn_first" onClick={() => tinder('/tinder')}>Давайте!</button>
|
||||
<button className="btn_second" onClick={() => main('/main')}>Пропустить</button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
Reference in New Issue
Block a user