}
diff --git a/src/widgets/courses-school/ui/courses.module.scss b/src/widgets/courses-school/ui/courses.module.scss
new file mode 100644
index 000000000..f219bb270
--- /dev/null
+++ b/src/widgets/courses-school/ui/courses.module.scss
@@ -0,0 +1,91 @@
+.course-title {
+ margin-top: 24px;
+ margin-bottom: 0;
+
+ font-size: 36px;
+ font-weight: $font-weight-medium;
+ line-height: 44px;
+ letter-spacing: 0;
+}
+
+.image {
+ @include media-laptop {
+ margin-top: 24px;
+ }
+
+ img {
+ width: 299px;
+ height: 193px;
+ }
+}
+
+.course-list {
+ @include media-laptop {
+ width: 100%;
+ }
+
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+ justify-content: space-between;
+
+ width: 800px;
+
+ .course-card {
+ @extend %transition-all;
+
+ @include media-hover {
+ &:hover {
+ box-shadow: 0 4px 16px 0 rgb(0 0 0 / 12%);
+ }
+ }
+
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+
+ width: 100%;
+ margin-top: 24px;
+
+ .icon-container {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 16px;
+
+ img {
+ width: 48px;
+ height: 36px;
+ object-fit: contain;
+ }
+ }
+
+ .course-info {
+ width: 100%;
+ text-align: left;
+
+ .name {
+ margin-top: 0;
+ margin-bottom: 0;
+
+ font-size: 18px;
+ font-weight: $font-weight-medium;
+ line-height: 24px;
+ color: $color-black;
+ }
+
+ .date {
+ margin-top: 8px;
+ margin-bottom: 0;
+
+ font-size: 14px;
+ line-height: 20px;
+ color: $color-gray-600;
+ }
+ }
+
+ .details-container {
+ padding: 16px;
+ }
+ }
+}
diff --git a/src/widgets/courses-school/ui/courses.scss b/src/widgets/courses-school/ui/courses.scss
deleted file mode 100644
index cd754d0e0..000000000
--- a/src/widgets/courses-school/ui/courses.scss
+++ /dev/null
@@ -1,94 +0,0 @@
-.courses {
- .title {
- margin-top: 24px;
- margin-bottom: 0;
-
- font-size: 36px;
- font-weight: $font-weight-medium;
- line-height: 44px;
- letter-spacing: 0;
- }
-
- .content {
- .image {
- @include media-laptop {
- margin-top: 24px;
- }
-
- img {
- width: 299px;
- height: 193px;
- }
- }
-
- .courses {
- @include media-laptop {
- width: 100%;
- }
-
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- justify-content: space-between;
-
- width: 800px;
-
- .course-card {
- @extend %transition-all;
-
- @include media-hover {
- &:hover {
- box-shadow: 0 4px 16px 0 rgb(0 0 0 / 12%);
- }
- }
-
- display: flex;
- align-items: center;
- justify-content: space-between;
-
- width: 100%;
- margin-top: 24px;
-
- .icon-container {
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 16px;
-
- img {
- width: 48px;
- height: 36px;
- }
- }
-
- .course-info {
- width: 100%;
- text-align: left;
-
- .name {
- margin-top: 0;
- margin-bottom: 0;
-
- font-size: 18px;
- font-weight: $font-weight-medium;
- line-height: 24px;
- color: $color-black;
- }
-
- .date {
- margin-top: 8px;
- margin-bottom: 0;
-
- font-size: 14px;
- line-height: 20px;
- color: $color-gray-600;
- }
- }
-
- .details-container {
- padding: 16px;
- }
- }
- }
- }
-}
diff --git a/src/widgets/courses-school/ui/courses.tsx b/src/widgets/courses-school/ui/courses.tsx
index 2eb9da4f8..894ef6b32 100644
--- a/src/widgets/courses-school/ui/courses.tsx
+++ b/src/widgets/courses-school/ui/courses.tsx
@@ -1,6 +1,5 @@
+import classNames from 'classnames/bind';
import { CourseCard } from './CourseCard';
-import { getCourseIcon } from '../lib/getCourseIcon';
-import { IconsTitle } from '../lib/icons.data';
import { selectCourses } from '../lib/selectCourses';
import { ROUTES } from '@/app/const';
@@ -9,7 +8,9 @@ import { useWindowSize } from '@/shared/hooks/use-window-size';
import { ArrowIcon, RsBanner } from '@/shared/icons';
import { LinkCustom } from '@/shared/ui/link-custom';
-import './courses.scss';
+import styles from './courses.module.scss';
+
+const cx = classNames.bind(styles);
export const Courses = () => {
const size = useWindowSize();
@@ -25,16 +26,14 @@ export const Courses = () => {
linkLabel = 'More';
}
- const coursesContent = coursesData?.map(({ title, language, startDate, detailsUrl }) => {
- const courseIcon = getCourseIcon(title as IconsTitle);
-
+ const coursesContent = coursesData?.map(({ title, language, startDate, detailsUrl, iconSrc }) => {
return (
@@ -42,17 +41,17 @@ export const Courses = () => {
});
return (
-
-
- Upcoming courses
-
-
+
+
+ Upcoming courses
+
+
{coursesContent}
} variant="colored" button>
Go to courses
-