mirror of
https://github.com/sergeyyarkov/educt-client.git
synced 2026-10-11 10:19:22 +03:00
feat: added link to teacher profile page
This commit is contained in:
parent
be418a18aa
commit
a773884b8a
@ -16,6 +16,7 @@ import {
|
|||||||
Tag,
|
Tag,
|
||||||
Stack,
|
Stack,
|
||||||
ImageProps,
|
ImageProps,
|
||||||
|
Link,
|
||||||
LinkBox,
|
LinkBox,
|
||||||
LinkOverlay,
|
LinkOverlay,
|
||||||
LinkBoxProps,
|
LinkBoxProps,
|
||||||
@ -41,7 +42,6 @@ import { useState } from 'react';
|
|||||||
import { useColorModeValue } from '@chakra-ui/react';
|
import { useColorModeValue } from '@chakra-ui/react';
|
||||||
import { useRootStore } from '@educt/hooks/useRootStore';
|
import { useRootStore } from '@educt/hooks/useRootStore';
|
||||||
import { CourseServiceInstance } from '@educt/services';
|
import { CourseServiceInstance } from '@educt/services';
|
||||||
import { EditButton } from '@educt/components/Buttons';
|
|
||||||
|
|
||||||
export const CourseHeader: React.FC<FlexProps> = props => (
|
export const CourseHeader: React.FC<FlexProps> = props => (
|
||||||
<Flex justifyContent='space-between' flexDir={{ base: 'column', xl: 'row' }} {...props}>
|
<Flex justifyContent='space-between' flexDir={{ base: 'column', xl: 'row' }} {...props}>
|
||||||
@ -63,10 +63,10 @@ export const CourseHeading: React.FC<ICourseHeadingProps> = props => {
|
|||||||
{title}
|
{title}
|
||||||
</Heading>
|
</Heading>
|
||||||
<Flex mt='3' alignItems={'center'}>
|
<Flex mt='3' alignItems={'center'}>
|
||||||
<Text fontSize='sm'>
|
<Link as={ReactRouterLink} to={`/user/${teacher.id}`} fontSize='sm' textDecor={'underline'}>
|
||||||
{teacher.fullname}
|
{teacher.fullname}
|
||||||
•
|
</Link>
|
||||||
</Text>
|
•
|
||||||
<Tag size='sm' variant='solid' bg={category.color?.hex}>
|
<Tag size='sm' variant='solid' bg={category.color?.hex}>
|
||||||
{category.title}
|
{category.title}
|
||||||
</Tag>
|
</Tag>
|
||||||
|
|||||||
@ -125,6 +125,7 @@ export const routes: IRouteOption[] = [
|
|||||||
title: 'Users management',
|
title: 'Users management',
|
||||||
component: UsersPage,
|
component: UsersPage,
|
||||||
isPrivate: true,
|
isPrivate: true,
|
||||||
|
exact: true,
|
||||||
roles: [UserRoleEnum.ADMIN, UserRoleEnum.TEACHER],
|
roles: [UserRoleEnum.ADMIN, UserRoleEnum.TEACHER],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user