generated from ita-social-projects/DevTemplate
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into #334-ability-to-select-both-company-startup
- Loading branch information
Showing
21 changed files
with
716 additions
and
695 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,30 @@ | ||
import css from './BreadCrumbs.module.css'; | ||
import { Link, useNavigate } from 'react-router-dom'; | ||
import { PropTypes } from 'prop-types'; | ||
|
||
const BreadCrumbs = (props) => { | ||
const BreadCrumbs = ({ currentPage }) => { | ||
const navigate = useNavigate(); | ||
|
||
const GoBackHandler = () => { | ||
const goBackHandler = () => { | ||
navigate(-1); | ||
}; | ||
return ( | ||
<div className={css['content']}> | ||
<button className={css['goback__button']} type="button" onClick={GoBackHandler}><i className={css['left']}></i>Назад</button> | ||
<Link className={css['main-page__button']} to="/">Головна</Link> | ||
<i className={css['right']}></i> | ||
<div className={css['current-page__button']}>{props.currentPage}</div> | ||
<button | ||
className={css['goback__button']} | ||
type="button" | ||
onClick={goBackHandler}> | ||
<i className={css['left']}> | ||
</i>Назад</button> | ||
<Link className={css['main-page__button']} to="/">Головна</Link> | ||
<i className={css['right']}></i> | ||
<div className={css['current-page__button']}>{currentPage}</div> | ||
</div> | ||
); | ||
}; | ||
|
||
BreadCrumbs.propTypes = { | ||
currentPage: PropTypes.string, | ||
}; | ||
|
||
export default BreadCrumbs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.