3 Commits

Author SHA1 Message Date
Primakov Alexandr Alexandrovich
6b903b4d54 3.3.1 2024-10-22 17:52:44 +03:00
Primakov Alexandr Alexandrovich
c3de9692d8 fix unmount stuff 2024-10-22 16:56:19 +03:00
Primakov Alexandr Alexandrovich
b2898ef4b3 try open exam as spa 2024-10-22 16:39:32 +03:00
4 changed files with 11 additions and 5 deletions

4
package-lock.json generated
View File

@@ -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",

View File

@@ -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": {

View File

@@ -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) {

View File

@@ -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>