Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b903b4d54 | ||
|
|
c3de9692d8 | ||
|
|
b2898ef4b3 |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "journal.pl",
|
||||
"version": "3.3.0",
|
||||
"version": "3.3.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "journal.pl",
|
||||
"version": "3.3.0",
|
||||
"version": "3.3.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@brojs/cli": "^0.0.4-beta.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "journal.pl",
|
||||
"version": "3.3.0",
|
||||
"version": "3.3.1",
|
||||
"description": "bro-js platform journal ui repo",
|
||||
"main": "./src/index.tsx",
|
||||
"scripts": {
|
||||
|
||||
@@ -24,7 +24,7 @@ export const mount = async (Сomponent, element = document.getElementById('app')
|
||||
}
|
||||
const store = createStore({ user });
|
||||
|
||||
const rootElement = ReactDOM.createRoot(element);
|
||||
rootElement = ReactDOM.createRoot(element);
|
||||
rootElement.render(<Сomponent store={store} />);
|
||||
|
||||
if(module.hot) {
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user