feat: added link to teacher profile page

This commit is contained in:
Sergey Yarkov 2022-03-01 22:30:00 +03:00
parent be418a18aa
commit a773884b8a
2 changed files with 5 additions and 4 deletions

View File

@ -16,6 +16,7 @@ import {
Tag,
Stack,
ImageProps,
Link,
LinkBox,
LinkOverlay,
LinkBoxProps,
@ -41,7 +42,6 @@ import { useState } from 'react';
import { useColorModeValue } from '@chakra-ui/react';
import { useRootStore } from '@educt/hooks/useRootStore';
import { CourseServiceInstance } from '@educt/services';
import { EditButton } from '@educt/components/Buttons';
export const CourseHeader: React.FC<FlexProps> = props => (
<Flex justifyContent='space-between' flexDir={{ base: 'column', xl: 'row' }} {...props}>
@ -63,10 +63,10 @@ export const CourseHeading: React.FC<ICourseHeadingProps> = props => {
{title}
</Heading>
<Flex mt='3' alignItems={'center'}>
<Text fontSize='sm'>
<Link as={ReactRouterLink} to={`/user/${teacher.id}`} fontSize='sm' textDecor={'underline'}>
{teacher.fullname}
</Link>
&nbsp;&bull;&nbsp;
</Text>
<Tag size='sm' variant='solid' bg={category.color?.hex}>
{category.title}
</Tag>

View File

@ -125,6 +125,7 @@ export const routes: IRouteOption[] = [
title: 'Users management',
component: UsersPage,
isPrivate: true,
exact: true,
roles: [UserRoleEnum.ADMIN, UserRoleEnum.TEACHER],
},
{