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",
|
"name": "journal.pl",
|
||||||
"version": "3.3.0",
|
"version": "3.3.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "journal.pl",
|
"name": "journal.pl",
|
||||||
"version": "3.3.0",
|
"version": "3.3.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@brojs/cli": "^0.0.4-beta.0",
|
"@brojs/cli": "^0.0.4-beta.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "journal.pl",
|
"name": "journal.pl",
|
||||||
"version": "3.3.0",
|
"version": "3.3.1",
|
||||||
"description": "bro-js platform journal ui repo",
|
"description": "bro-js platform journal ui repo",
|
||||||
"main": "./src/index.tsx",
|
"main": "./src/index.tsx",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export const mount = async (Сomponent, element = document.getElementById('app')
|
|||||||
}
|
}
|
||||||
const store = createStore({ user });
|
const store = createStore({ user });
|
||||||
|
|
||||||
const rootElement = ReactDOM.createRoot(element);
|
rootElement = ReactDOM.createRoot(element);
|
||||||
rootElement.render(<Сomponent store={store} />);
|
rootElement.render(<Сomponent store={store} />);
|
||||||
|
|
||||||
if(module.hot) {
|
if(module.hot) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import { Link as ConnectedLink } from 'react-router-dom'
|
import { Link as ConnectedLink } from 'react-router-dom'
|
||||||
import { getNavigationsValue } from '@brojs/cli'
|
import { getNavigationsValue, getHistory } from '@brojs/cli'
|
||||||
import {
|
import {
|
||||||
Stack,
|
Stack,
|
||||||
Heading,
|
Heading,
|
||||||
@@ -21,6 +21,8 @@ type CourseDetailsProps = {
|
|||||||
populatedCourse: PopulatedCourse;
|
populatedCourse: PopulatedCourse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const history = getHistory()
|
||||||
|
|
||||||
export const CourseDetails = ({ populatedCourse }: CourseDetailsProps) => {
|
export const CourseDetails = ({ populatedCourse }: CourseDetailsProps) => {
|
||||||
const user = useAppSelector((s) => s.user)
|
const user = useAppSelector((s) => s.user)
|
||||||
const exam = populatedCourse.examWithJury
|
const exam = populatedCourse.examWithJury
|
||||||
@@ -35,6 +37,10 @@ export const CourseDetails = ({ populatedCourse }: CourseDetailsProps) => {
|
|||||||
as={'a'}
|
as={'a'}
|
||||||
colorScheme="blue"
|
colorScheme="blue"
|
||||||
href={getNavigationsValue('exam.main') + getNavigationsValue('link.exam.details').replace(':courseId', populatedCourse.id).replace(':examId', exam.id)}
|
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>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user