diff --git a/src/pages-templates/about/index.tsx b/src/pages-templates/about/index.tsx
index 5eebb9a..32d4189 100644
--- a/src/pages-templates/about/index.tsx
+++ b/src/pages-templates/about/index.tsx
@@ -12,6 +12,7 @@ import AnimatedCounter from '@/shared/components/animated-counter';
import { Container } from '@/shared/components/container';
import { Review } from '@/shared/components/review';
import { useTextController } from '@/shared/language/hooks/use-text-controller';
+import { useMediaController } from '@/shared/media/hooks/use-media-controller';
import { Button } from '@/shared/shadcn-ui/button';
import { Card, CardContent } from '@/shared/shadcn-ui/card';
@@ -25,6 +26,7 @@ export interface AboutPageProps {
export default function AboutPage({ content }: AboutPageProps) {
const { t } = useTextController();
+ const { m } = useMediaController();
return (
@@ -33,7 +35,10 @@ export default function AboutPage({ content }: AboutPageProps) {
@@ -19,7 +21,10 @@ export function ClientsPage() {
@@ -25,7 +23,10 @@ export function LoyaltyPage() {
{
const { m } = useMediaController();
- const logo = m('logo');
return (
;
type MediaControlContextType = {
- m: (key: string) => MediaItem | undefined;
+ m: (key: string) => string | null;
};
export const MediaControlContext = createContext<
@@ -26,12 +26,12 @@ export function MediaControlProvider({
return pr;
}, {} as MediaMap);
- const getMedia = (key: string): MediaItem | undefined => {
+ const getMedia = (key: string): string | null => {
if (mediaMap?.[key]) {
- return mediaMap[key];
+ return mediaMap[key].photo;
}
console.warn(`Media key not found: ${key}`);
- return undefined;
+ return null;
};
return (
diff --git a/src/widgets/about-section.tsx b/src/widgets/about-section.tsx
index 5fd9d1a..c6ad049 100644
--- a/src/widgets/about-section.tsx
+++ b/src/widgets/about-section.tsx
@@ -6,9 +6,11 @@ import Image from 'next/image';
import AboutCounter from '@/shared/components/about-counter';
import { Container } from '@/shared/components/container';
import { useTextController } from '@/shared/language/hooks/use-text-controller';
+import { useMediaController } from '@/shared/media/hooks/use-media-controller';
export const AboutSection = () => {
const { t } = useTextController();
+ const { m } = useMediaController();
return (
@@ -37,7 +39,7 @@ export const AboutSection = () => {
data-aos='zoom-in-down'
>
{
const { t } = useTextController();
const { m } = useMediaController();
- const charityMedia = m('home.charity.banner');
-
return (
@@ -25,7 +23,8 @@ export const CharitySection = () => {
>
= [
export const BenefitsSection = () => {
const { t } = useTextController();
+ const { m } = useMediaController();
return (
@@ -72,7 +74,10 @@ export const BenefitsSection = () => {
className='relative order-1 h-[400px] overflow-hidden rounded-xl shadow-xl md:order-2'
>
{
const { t } = useTextController();
const { m } = useMediaController();
- const banner = m('home.hero-section.banner');
-
return (
@@ -28,7 +26,7 @@ export const HeroSection = () => {
className='sm:!-top-16 sm:-right-40 sm:!h-[70vh] sm:!w-[100vh] md:!-top-10 md:!-right-30 xl:!top-0 xl:!right-0'
>
{
const { t } = useTextController();
- const { m } = useMediaController();
-
- const stationsMedia = m('stations.main');
return (