finished home page
This commit is contained in:
@ -1,23 +1,24 @@
|
||||
import React from 'react';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
|
||||
// import PhotoBlock from './PhotoBlock';
|
||||
|
||||
// import { candidatesList } from '../Home/Home'
|
||||
import { useParams, useHistory } from 'react-router-dom';
|
||||
import { candidatesList } from '../Home/sections/Description';
|
||||
|
||||
import classes from './Candidate.module.scss';
|
||||
|
||||
const Candidate = () => {
|
||||
// const { id: candidateId } = useParams();
|
||||
// const currentCandidate = candidatesList.find((el) => el.id === Number(candidateId));
|
||||
const history = useHistory();
|
||||
|
||||
const { id: candidateId } = useParams();
|
||||
|
||||
const currentCandidate = candidatesList.find((el) => el.id === Number(candidateId));
|
||||
|
||||
return (
|
||||
<div className={classes.wrapper}>
|
||||
<NavLink to="/">Home</NavLink>
|
||||
{/* <h1>
|
||||
<button style={{ margin: '60px' }} onClick={() => history.push('/')}>
|
||||
Home
|
||||
</button>
|
||||
<h1>
|
||||
Candidate name: <span>{currentCandidate.name}</span>
|
||||
</h1>
|
||||
<PhotoBlock /> */}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user