diff --git a/client/components/MainPage/MainPage.tsx b/client/components/MainPage/MainPage.tsx
index be5530ee..4b8eeec2 100644
--- a/client/components/MainPage/MainPage.tsx
+++ b/client/components/MainPage/MainPage.tsx
@@ -16,6 +16,8 @@ import { Marquee } from './Marquee/Marquee';
const cn = classNames.bind(styles);
export function MainPage({ cards, cardsDynamicData, marqueeItems }: MainPageTypes) {
+ const marqueeItemsData = marqueeItems.map(({ id, attributes: { message } }) => ({ id, message }))
+
const getDynamicContent = (dynamicId) => {
switch (dynamicId) {
case 'a11y-transport':
@@ -23,7 +25,7 @@ export function MainPage({ cards, cardsDynamicData, marqueeItems }: MainPageType
case 'traffic-jams':
return
case 'map':
- return
+ return
}
}
@@ -32,7 +34,7 @@ export function MainPage({ cards, cardsDynamicData, marqueeItems }: MainPageType
-
Транспорт
Екатеринбурга
+ Транспорт
Екатеринбурга
@@ -54,7 +56,7 @@ export function MainPage({ cards, cardsDynamicData, marqueeItems }: MainPageType
})}
-
);
diff --git a/client/components/MainPage/Marquee/Marquee.tsx b/client/components/MainPage/Marquee/Marquee.tsx
index a480143f..833b3aa2 100644
--- a/client/components/MainPage/Marquee/Marquee.tsx
+++ b/client/components/MainPage/Marquee/Marquee.tsx
@@ -11,8 +11,10 @@ export function Marquee({ items }: MarqueeProps) {
return (
- {items.map((item) => (
-
{item}
+ {items.map(({ id, message }) => (
+
+ {message}
+
))}
diff --git a/client/components/MainPage/Marquee/Marquee.types.tsx b/client/components/MainPage/Marquee/Marquee.types.tsx
index 659b6326..ba35905a 100644
--- a/client/components/MainPage/Marquee/Marquee.types.tsx
+++ b/client/components/MainPage/Marquee/Marquee.types.tsx
@@ -1,3 +1,8 @@
export type MarqueeProps = {
- items: string[];
+ items: MarqueeItem[],
};
+
+type MarqueeItem = {
+ id: number,
+ message: string,
+}