Skip to content

Commit

Permalink
fix(KUI-1378): improve the code and fix an issue
Browse files Browse the repository at this point in the history
  • Loading branch information
amirhossein-haerian committed Aug 30, 2024
1 parent d148a59 commit 8452a07
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
3 changes: 0 additions & 3 deletions public/js/app/components/RoundInformation/PlannedModules.jsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { useLanguage } from '../../hooks/useLanguage'
import InfoModal from '../InfoModal'
import { CourseMemoLink } from './CourseMemoLink'
import { CourseScheduleLink } from './CourseScheduleLink'
import { PlannedModules } from './PlannedModules'

// Calculates if a "Show more" button should be displayed, and creates props for content and button elements.
const useShowMoreContent = content => {
Expand Down Expand Up @@ -117,9 +116,7 @@ function RoundInformationInfoGrid({ courseCode, courseRound, plannedModules }) {
<p>{courseRound.round_seats || translation.courseRoundInformation.round_no_seats_limit}</p>
</Item>
<Item title={translation.courseRoundInformation.round_target_group} html={courseRound.round_target_group} />
<Item title={translation.courseRoundInformation.round_time_slots}>
<PlannedModules plannedModules={plannedModules} />
</Item>
<Item title={translation.courseRoundInformation.round_time_slots} html={plannedModules} />
<Item title={translation.courseLabels.label_schedule}>
<CourseScheduleLink courseRound={courseRound} />
</Item>
Expand Down
6 changes: 3 additions & 3 deletions public/js/app/hooks/usePlannedModules.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useMissingInfo } from './useMissingInfo'

const MISSING_INFO = ''

export const usePlannedModules = ({ courseCode, semester, applicationCode }) => {
export const usePlannedModules = ({ courseCode, selectedSemester, applicationCode }) => {
const context = useWebContext()
const { missingInfoLabel } = useMissingInfo()

Expand All @@ -16,10 +16,10 @@ export const usePlannedModules = ({ courseCode, semester, applicationCode }) =>
() => ({
basePath,
courseCode,
semester,
selectedSemester,
applicationCode,
}),
[basePath, courseCode, semester, applicationCode]
[basePath, courseCode, selectedSemester, applicationCode]
)

const { data, isError, isLoading } = useApi(getPlannedModules, requestData, null, MISSING_INFO)
Expand Down

0 comments on commit 8452a07

Please sign in to comment.