From df86b98fec6b098e128cbe24cd47dcca36f1e209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janis=20Daniel=20Da=CC=88hne?= <janis.daehne@informatik.uni-halle.de> Date: Wed, 3 Feb 2021 13:37:42 +0100 Subject: [PATCH] - create exercise site now properly reloads to get new ids --- src/app.tsx | 18 ++++++++++-------- src/constants.ts | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/app.tsx b/src/app.tsx index 769e3555..8c90bdd1 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -289,7 +289,7 @@ class App extends React.Component<Props, any> { //exercise editor create, update, copy } <Route exact path={constants.exerciseEditorCreateNewLinkPath} render={(props: RouteComponentProps<any>) => - <PageContentWrapper + <PageContentWrapper key={props.location.pathname} //force to reload/remount to reload ex with all new ids after creation headerBar={ <CommonHeaderBar> <ExerciseEditorSiteHeaderBarContent/> @@ -300,16 +300,18 @@ class App extends React.Component<Props, any> { </PageContentWrapper> }/> - <Route exact path={constants.exerciseEditorChangeLinkPath} render={(props: RouteComponentProps<any>) => - <PageContentWrapper - headerBar={ - <CommonHeaderBar> - <ExerciseEditorSiteHeaderBarContent/> - </CommonHeaderBar> - } + <Route exact path={constants.exerciseEditorChangeLinkPath} render={(props: RouteComponentProps<any>) => { + + return <PageContentWrapper key={props.location.pathname} + headerBar={ + <CommonHeaderBar> + <ExerciseEditorSiteHeaderBarContent/> + </CommonHeaderBar> + } > <ExerciseEditorSite {...props}/> </PageContentWrapper> + } }/> { diff --git a/src/constants.ts b/src/constants.ts index 959f9363..d07e980d 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.10.1' +export const versionString = '2.10.2' export const supportMail = 'yapex@informatik.uni-halle.de' -- GitLab