fixes styles and routes
This commit is contained in:
@ -57,7 +57,7 @@ export const ProfileCalendar = () => {
|
||||
<img src={profileInfo.photo} className='summary__avatar' alt='avatar'/>
|
||||
<p className='summary__name'>{profileInfo.fio} {profileInfo.specification}</p>
|
||||
</div>
|
||||
<Link to='/profile/report'>
|
||||
<Link to='/report'>
|
||||
<button className="calendar__btn">Заполнить отчет за день</button>
|
||||
</Link>
|
||||
</div>
|
||||
|
@ -49,10 +49,10 @@ export const ProfileCalendarComponent = ({reportsDates}) => {
|
||||
function correctRoute(day) {
|
||||
for (const date of reportsDates) {
|
||||
if (`${new Date(day).getFullYear()}-${correctDay(new Date(day).getMonth() + 1)}-${correctDay(new Date(day).getDate())}` === date.date) {
|
||||
return `/view/report`
|
||||
return `../../view/report`
|
||||
}
|
||||
}
|
||||
return '/profile/report'
|
||||
return '../../report'
|
||||
}
|
||||
|
||||
// function prevMonth() {
|
||||
@ -104,7 +104,7 @@ export const ProfileCalendarComponent = ({reportsDates}) => {
|
||||
name={day.format('dddd')}
|
||||
id='btn'
|
||||
>
|
||||
<Link to={() => correctRoute(day)}>
|
||||
<Link to={correctRoute(day)}>
|
||||
<img className={'calendar__icon'} src={calendarIcon} alt='' />
|
||||
{currentMonthAndDay(day)}
|
||||
</Link>
|
||||
|
Reference in New Issue
Block a user