Skip to content

Commit

Permalink
Fix sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Feb 4, 2025
1 parent a532e8b commit 1017b1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Html from 'rdmo/core/assets/js/components/Html'

import NavigationLink from './NavigationLink'

const Navigation = ({ currentPage, navigation, help, fetchPage }) => {
const Navigation = ({ overview, currentPage, navigation, help, fetchPage }) => {
return (
<>
<h2>{gettext('Navigation')}</h2>
Expand All @@ -18,7 +18,7 @@ const Navigation = ({ currentPage, navigation, help, fetchPage }) => {
<li key={sectionIndex}>
<NavigationLink
element={section}
href={`/projects/12/interview/${section.first}/`}
href={`/projects/${overview.id}/interview/${section.first}/`}
onClick={() => fetchPage(section.first)}
/>
{
Expand All @@ -33,7 +33,7 @@ const Navigation = ({ currentPage, navigation, help, fetchPage }) => {
page.show ? (
<NavigationLink
element={page}
href={`/projects/12/interview/${page.id}/`}
href={`/projects/${overview.id}/interview/${page.id}/`}
onClick={() => fetchPage(page.id)}
/>
) : (
Expand All @@ -57,6 +57,7 @@ const Navigation = ({ currentPage, navigation, help, fetchPage }) => {
}

Navigation.propTypes = {
overview: PropTypes.object.isRequired,
currentPage: PropTypes.object,
navigation: PropTypes.array.isRequired,
help: PropTypes.string.isRequired,
Expand Down
1 change: 1 addition & 0 deletions rdmo/projects/assets/js/interview/containers/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const Sidebar = ({ config, settings, templates, user, project, interview, config
help={templates.project_interview_buttons_help}
fetchPage={interviewActions.fetchPage} />
<Navigation
overview={project.overview}
currentPage={interview.page}
navigation={interview.navigation}
help={templates.project_interview_navigation_help}
Expand Down

0 comments on commit 1017b1e

Please sign in to comment.