try open exam as spa
This commit is contained in:
parent
26c8a477c3
commit
b2898ef4b3
@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import dayjs from 'dayjs'
|
||||
import { Link as ConnectedLink } from 'react-router-dom'
|
||||
import { getNavigationsValue } from '@brojs/cli'
|
||||
import { getNavigationsValue, getHistory } from '@brojs/cli'
|
||||
import {
|
||||
Stack,
|
||||
Heading,
|
||||
@ -21,6 +21,8 @@ type CourseDetailsProps = {
|
||||
populatedCourse: PopulatedCourse;
|
||||
}
|
||||
|
||||
const history = getHistory()
|
||||
|
||||
export const CourseDetails = ({ populatedCourse }: CourseDetailsProps) => {
|
||||
const user = useAppSelector((s) => s.user)
|
||||
const exam = populatedCourse.examWithJury
|
||||
@ -35,6 +37,10 @@ export const CourseDetails = ({ populatedCourse }: CourseDetailsProps) => {
|
||||
as={'a'}
|
||||
colorScheme="blue"
|
||||
href={getNavigationsValue('exam.main') + getNavigationsValue('link.exam.details').replace(':courseId', populatedCourse.id).replace(':examId', exam.id)}
|
||||
onClick={event => {
|
||||
event.preventDefault();
|
||||
history.push(getNavigationsValue('exam.main') + getNavigationsValue('link.exam.details').replace(':courseId', populatedCourse.id).replace(':examId', exam.id))
|
||||
}}
|
||||
>
|
||||
Открыть
|
||||
</Button>
|
||||
|
Loading…
Reference in New Issue
Block a user