fixes styles and routes

This commit is contained in:
2023-01-16 20:38:33 +03:00
parent f75510b20c
commit 50ab182135
9 changed files with 343 additions and 440 deletions

View File

@ -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>

View File

@ -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>