diff --git a/src/app.tsx b/src/app.tsx index c90903d4df6cec9c7dd7b980b1e71c571d4f2a5a..769e3555830b6c8458bca47a1df9ab0d70008b79 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -225,8 +225,9 @@ class App extends React.Component<Props, any> { { //edit custom projects site (create, edit) + //maybe the key is not needed here but why not } - <Route exact path={constants.createCustomProjectSiteToLinkPath} + <Route exact key={constants.createCustomProjectSiteToLinkPath} path={constants.createCustomProjectSiteToLinkPath} render={(props: RouteComponentProps<any>) => <PageContentWrapper headerBar={ @@ -239,7 +240,12 @@ class App extends React.Component<Props, any> { </PageContentWrapper> }/> - <Route exact path={constants.getCustomProjectMatchLinkPath} render={(props: RouteComponentProps<any>) => + { + //we need key to re-mount component so we fully load the new project after creation + //see https://github.com/ReactTraining/react-router/issues/1703 + //see https://stackoverflow.com/questions/47804798/how-to-re-render-the-same-component-being-used-in-different-routes + } + <Route exact key={constants.getCustomProjectMatchLinkPath} path={constants.getCustomProjectMatchLinkPath} render={(props: RouteComponentProps<any>) => <PageContentWrapper headerBar={ <CommonHeaderBar> diff --git a/src/components/sites/exerciseEditorSite/descriptionEditorPanel/descriptionEditorPanelView.tsx b/src/components/sites/exerciseEditorSite/descriptionEditorPanel/descriptionEditorPanelView.tsx index bb6b4f18b8c221e38fc3fb396a5a62162a8d489b..ba5b7bd8d9fd177eb3329ef4a54d3b97572e4991 100644 --- a/src/components/sites/exerciseEditorSite/descriptionEditorPanel/descriptionEditorPanelView.tsx +++ b/src/components/sites/exerciseEditorSite/descriptionEditorPanel/descriptionEditorPanelView.tsx @@ -13,6 +13,7 @@ import { descriptionEditorDebounceInMs, editExerciseExerciseDescriptionEditorPanelViewEditorId } from '../../../../constants' +import {getNextFrontendId} from '../../../../helpers/frontendIdHelper' //const css = require('./styles.styl'); @@ -29,8 +30,7 @@ const mapStateToProps = (rootState: RootState, props: MyProps) => { return { //test0: rootState... //test: props.test - descriptionContent: props.descriptionContent, - setContent: props.setContent, + ...props, } } diff --git a/src/components/sites/manageCustomProjectsSite/headerBarContent.tsx b/src/components/sites/manageCustomProjectsSite/headerBarContent.tsx index c55a215373dbb365c027de46d107ca89ff0f734a..25a5188add7e0df3a77e385141313e53590d1d1e 100644 --- a/src/components/sites/manageCustomProjectsSite/headerBarContent.tsx +++ b/src/components/sites/manageCustomProjectsSite/headerBarContent.tsx @@ -54,8 +54,6 @@ class headerBar extends React.Component<Props, any> { render(): JSX.Element { - console.log(this.props.systemSettings) - const leftArea = ( <div className="flexed"> diff --git a/src/constants.ts b/src/constants.ts index cc214edb813d9d82625ff8257f2921d8c30e2131..673e724f36819abf0717f3f5836f96eee83aaa84 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -13,7 +13,7 @@ import Logger from './helpers/logger' * y - breaking changes / new features * z - fixes, small changes */ -export const versionString = '2.5.9' +export const versionString = '2.5.11' export const supportMail = 'yapex@informatik.uni-halle.de' diff --git a/src/state/actions/editCustomProjectSite/editCustomProjectActions.ts b/src/state/actions/editCustomProjectSite/editCustomProjectActions.ts index 929fe3c212cc6c72273f29956325a16e5af189f0..7b7ef03129d7a22d635bb0bf9c6cedc00b86c43e 100644 --- a/src/state/actions/editCustomProjectSite/editCustomProjectActions.ts +++ b/src/state/actions/editCustomProjectSite/editCustomProjectActions.ts @@ -311,7 +311,6 @@ export function loadEditCustomProjectSite(customProjectId: number | null, isCrea await dispatch(getCustomProjectAsync(customProjectId)) - await dispatch(getCustomProjectTestResultsAsync(customProjectId, getState().editCustomProjectSiteState.customProject.solution.pLangId)) // await dispatch(