Skip to content

Commit

Permalink
Removed comment, renamed input parameter, removed ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
axelbjo committed Jul 23, 2024
1 parent 01dceb2 commit b09e7c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions public/js/app/components/CourseTitle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ import { useFormatCredits } from '../hooks/useFormatCredits'

const adminLink = (courseCode, languageShortname) => `/kursinfoadmin/kurser/kurs/${courseCode}?l=${languageShortname}`

const CourseTitle = ({ courseTitleData = '', pageTitle, preparatory }) => {
const CourseTitle = ({ courseTitleData = '', pageTitle, courseLevelCode }) => {
const title = courseTitleData
// const preparatory = courseData.courseInfo.course_level_code
const isPreparatory = preparatory == 'PREPARATORY' ? true : false
const isPreparatory = courseLevelCode === 'PREPARATORY'
const { translation, languageShortname } = useLanguage()
const { formatCredits } = useFormatCredits()
const adminLinkLabel = translation.courseLabels.label_edit
Expand Down
2 changes: 1 addition & 1 deletion public/js/app/pages/CoursePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function CoursePage() {
<CourseTitle
key="title"
courseTitleData={courseData.courseTitleData}
preparatory={courseData.courseInfo.course_level_code}
courseLevelCode={courseData.courseInfo.course_level_code}
language={languageShortname}
pageTitle={translation.courseLabels.sideMenu.page_before_course}
/>
Expand Down

0 comments on commit b09e7c6

Please sign in to comment.