no attendance link if no nav element

This commit is contained in:
Primakov Alexandr Alexandrovich 2024-11-06 12:59:24 +03:00
parent e56f0e4e5d
commit 22a9199d9d

View File

@ -57,21 +57,27 @@ export const CourseCard = ({ course }: { course: Course }) => {
<CourseDetails populatedCourse={populatedCourse.data} /> <CourseDetails populatedCourse={populatedCourse.data} />
)} )}
<Tooltip label="На страницу с лекциями" fontSize="12px" top="16px"> {getNavigationsValue('link.journal.attendance') && (
<Button <Tooltip
leftIcon={<LinkIcon />} label="На страницу с лекциями"
as={ConnectedLink} fontSize="12px"
variant="outline" top="16px"
colorScheme="blue"
to={generatePath(
`${getNavigationsValue('journal.main')}${getNavigationsValue('link.journal.attendance')}`,
{ courseId: course.id },
)}
> >
<Box mt={3}></Box> <Button
Посещаемость leftIcon={<LinkIcon />}
</Button> as={ConnectedLink}
</Tooltip> variant="outline"
colorScheme="blue"
to={generatePath(
`${getNavigationsValue('journal.main')}${getNavigationsValue('link.journal.attendance')}`,
{ courseId: course.id },
)}
>
<Box mt={3}></Box>
Посещаемость
</Button>
</Tooltip>
)}
</Stack> </Stack>
</CardBody> </CardBody>
)} )}