Skip to content

Commit

Permalink
[Training] fixes desktop routes
Browse files Browse the repository at this point in the history
  • Loading branch information
Elorfin committed Aug 26, 2024
1 parent cc0b98d commit d7de07a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {CourseCreation} from '#/plugin/cursus/course/components/creation'

const CatalogMain = (props) =>
<Routes
path={props.path}
path={props.path+'/course'}
routes={[
{
path: '/',
Expand All @@ -26,11 +26,11 @@ const CatalogMain = (props) =>
disabled: !props.canEdit,
component: CourseCreation
}, {
path: '/course/:slug/edit',
path: '/:slug/edit',
onEnter: (params = {}) => props.openForm(params.slug),
component: CourseEdit
}, {
path: '/course/:slug',
path: '/:slug',
onEnter: (params = {}) => props.open(params.slug),
render: (params = {}) => (
<Course
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const TrainingsTool = (props) =>
name: 'catalog',
type: LINK_BUTTON,
label: trans('catalog', {}, 'cursus'),
target: props.path
target: props.path+'/course'
}, {
name: 'public',
type: LINK_BUTTON,
Expand All @@ -43,9 +43,12 @@ const TrainingsTool = (props) =>
displayed: props.authenticated
}
]}
redirect={[
{from: '/', to: '/course', exact: true}
]}
pages={[
{
path: '/',
path: '/course',
component: CatalogMain
}, {
path: '/registered',
Expand Down

0 comments on commit d7de07a

Please sign in to comment.