Skip to content

Commit

Permalink
refactor(issues/KUI-1336): delete CoursePresentaion component and an …
Browse files Browse the repository at this point in the history
…small refactor in CourseMemo file
  • Loading branch information
amirhossein-haerian committed Jun 3, 2024
1 parent 9c0247d commit 425ec36
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 68 deletions.
3 changes: 0 additions & 3 deletions i18n/messages.en.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,6 @@ module.exports = {
previousOfferings: 'Previous course offerings',
startdate: 'Start date',
},
coursePresentationLabels: {
coursePresentation: 'Course presentation',
},
breadCrumbs: {
student: 'Student web',
studies: 'Studies',
Expand Down
3 changes: 0 additions & 3 deletions i18n/messages.se.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,6 @@ module.exports = {
previousOfferings: 'Tidigare kursomgångar',
startdate: 'Startdatum',
},
coursePresentationLabels: {
coursePresentation: 'Presentation av kursen',
},
breadCrumbs: {
student: 'Studentwebben',
studies: 'Studier',
Expand Down
16 changes: 0 additions & 16 deletions public/js/app/components/CoursePresentation.jsx

This file was deleted.

16 changes: 0 additions & 16 deletions public/js/app/components/__tests__/CoursePresentation.test.js

This file was deleted.

9 changes: 1 addition & 8 deletions public/js/app/pages/CourseMemo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { menuItemsForCurrentMemo } from '../util/menu-memo-items'

import { useWebContext } from '../context/WebContext'

import CoursePresentation from '../components/CoursePresentation'
import SideMenu from '../components/SideMenu'
import CourseHeader from '../components/CourseHeader'
import CourseContacts from '../components/CourseContacts'
Expand Down Expand Up @@ -127,7 +126,6 @@ function CourseMemo() {
courseFactsLabels,
courseMemoLinksLabels,
extraInfo,
coursePresentationLabels,
courseLinksLabels,
courseContactsLabels,
sectionsLabels,
Expand Down Expand Up @@ -212,13 +210,8 @@ function CourseMemo() {
/>
<Row>
<Col id="flexible-content-of-center" lg="8" className="text-break col-print-12 content-center">
<CoursePresentation
courseImageUrl={courseImageUrl}
introText={webContext.sellingText}
labels={coursePresentationLabels}
/>
<p className="mb-4">
{sectionsLabels.asterisk} {seasonStr(i18n.messages[memoLanguageIndex].extraInfo, validFromTerm)}
{sectionsLabels.asterisk} {seasonStr(extraInfo, validFromTerm)}
</p>
<AllSections memoData={memo} memoLanguageIndex={memoLanguageIndex} />
<Contacts language={memoLanguage} memoData={memo} labels={courseContactsLabels} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,28 +311,6 @@ exports[`Page CourseMemo renders a side menu and a page structure 1`] = `
class="text-break col-print-12 content-center col-lg-8"
id="flexible-content-of-center"
>
<section
aria-labelledby="course-presentation"
class="d-print-none"
>
<h2
class="visually-hidden"
id="course-presentation"
>
Presentation av kursen
</h2>
<img
alt=""
class="float-sm-start"
id="course-presentation-image"
src="localhost://Picture_by_MainFieldOfStudy_26_Default_picture.jpg"
/>
<article
aria-labelledby="course-presentation"
>
<div />
</article>
</section>
<p
class="mb-4"
>
Expand Down

0 comments on commit 425ec36

Please sign in to comment.