update: set media from taylor-db
This commit is contained in:
parent
c660c18d37
commit
3367b38f23
@ -5,6 +5,7 @@ import Image from 'next/image';
|
|||||||
|
|
||||||
import { Container } from '@/shared/components/container';
|
import { Container } from '@/shared/components/container';
|
||||||
import { useTextController } from '@/shared/language/hooks/use-text-controller';
|
import { useTextController } from '@/shared/language/hooks/use-text-controller';
|
||||||
|
import { useMediaController } from '@/shared/media/hooks/use-media-controller';
|
||||||
|
|
||||||
// import LoyaltyLevels from '@/widgets/clients/loyalty/ui/loyalty-levels';
|
// import LoyaltyLevels from '@/widgets/clients/loyalty/ui/loyalty-levels';
|
||||||
import { CtaSection } from '@/widgets/cta-section';
|
import { CtaSection } from '@/widgets/cta-section';
|
||||||
@ -13,6 +14,9 @@ import ProgrammImg from '../../../../public/clients/loyatly/03a771e7-5d76-4111-a
|
|||||||
|
|
||||||
export function LoyaltyPage() {
|
export function LoyaltyPage() {
|
||||||
const { t } = useTextController();
|
const { t } = useTextController();
|
||||||
|
const { m } = useMediaController();
|
||||||
|
|
||||||
|
const loyaltyProgrammMedia = m('page.loyaly.banner1');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='flex min-h-screen flex-col'>
|
<div className='flex min-h-screen flex-col'>
|
||||||
@ -107,7 +111,7 @@ export function LoyaltyPage() {
|
|||||||
className='relative h-[400px] overflow-hidden rounded-xl shadow-xl'
|
className='relative h-[400px] overflow-hidden rounded-xl shadow-xl'
|
||||||
>
|
>
|
||||||
<Image
|
<Image
|
||||||
src={ProgrammImg}
|
src={loyaltyProgrammMedia?.photo || ProgrammImg}
|
||||||
alt='Программа лояльности'
|
alt='Программа лояльности'
|
||||||
fill
|
fill
|
||||||
className='w-full object-contain p-2.5'
|
className='w-full object-contain p-2.5'
|
||||||
|
|||||||
@ -1,11 +1,22 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
|
||||||
|
import { useMediaController } from '../media/hooks/use-media-controller';
|
||||||
|
|
||||||
export const Logo = () => {
|
export const Logo = () => {
|
||||||
|
const { m } = useMediaController();
|
||||||
|
const logo = m('logo');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link className='flex items-center gap-2' href={'/'}>
|
<Link className='flex items-center gap-2' href={'/'}>
|
||||||
<Image src='/logo-new.png' alt='oriyo-logo' width={110} height={40} />
|
<Image
|
||||||
{/* <span className='text-xl font-bold'>Ориё</span> */}
|
src={logo?.photo || '/logo-new.png'}
|
||||||
|
alt='oriyo-logo'
|
||||||
|
width={110}
|
||||||
|
height={40}
|
||||||
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,10 +6,14 @@ import Link from 'next/link';
|
|||||||
|
|
||||||
import { Container } from '@/shared/components/container';
|
import { Container } from '@/shared/components/container';
|
||||||
import { useTextController } from '@/shared/language/hooks/use-text-controller';
|
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 { Button } from '@/shared/shadcn-ui/button';
|
||||||
|
|
||||||
export const CharitySection = () => {
|
export const CharitySection = () => {
|
||||||
const { t } = useTextController();
|
const { t } = useTextController();
|
||||||
|
const { m } = useMediaController();
|
||||||
|
|
||||||
|
const charityMedia = m('home.charity.banner');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id='charity'>
|
<section id='charity'>
|
||||||
@ -20,10 +24,13 @@ export const CharitySection = () => {
|
|||||||
data-aos='zoom-in'
|
data-aos='zoom-in'
|
||||||
>
|
>
|
||||||
<Image
|
<Image
|
||||||
src='/placeholder.svg?height=400&width=600'
|
src={
|
||||||
|
charityMedia?.photo || '/placeholder.svg?height=400&width=600'
|
||||||
|
}
|
||||||
alt='Charity Foundation'
|
alt='Charity Foundation'
|
||||||
fill
|
fill
|
||||||
className='object-cover'
|
className='object-cover'
|
||||||
|
loader={({ src }) => src}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className='order-1 md:order-2'>
|
<div className='order-1 md:order-2'>
|
||||||
|
|||||||
@ -5,10 +5,14 @@ import Image from 'next/image';
|
|||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
|
||||||
import { useTextController } from '@/shared/language/hooks/use-text-controller';
|
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 { Button } from '@/shared/shadcn-ui/button';
|
||||||
|
|
||||||
export const HeroSection = () => {
|
export const HeroSection = () => {
|
||||||
const { t } = useTextController();
|
const { t } = useTextController();
|
||||||
|
const { m } = useMediaController();
|
||||||
|
|
||||||
|
const banner = m('home.hero-section.banner');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className='relative'>
|
<section className='relative'>
|
||||||
@ -21,13 +25,13 @@ export const HeroSection = () => {
|
|||||||
// top: -60,
|
// top: -60,
|
||||||
// right: 20,
|
// right: 20,
|
||||||
}}
|
}}
|
||||||
className='sm:!top-0 sm:!right-20 sm:!h-[70vh] sm:!w-[100vh]'
|
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'
|
||||||
>
|
>
|
||||||
<Image
|
<Image
|
||||||
src='/oriyo_bg.jpeg'
|
src={banner?.photo || '/oriyo_bg.jpeg'}
|
||||||
alt='Oriyo Station'
|
alt='Oriyo Station'
|
||||||
fill
|
fill
|
||||||
className='object-cover'
|
className='object-cover sm:scale-110 md:scale-120 xl:scale-140'
|
||||||
priority
|
priority
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -16,10 +16,8 @@ interface MapSectionProps {
|
|||||||
|
|
||||||
export const MapSection = ({ stations }: MapSectionProps) => {
|
export const MapSection = ({ stations }: MapSectionProps) => {
|
||||||
const { t } = useTextController();
|
const { t } = useTextController();
|
||||||
|
|
||||||
const { m } = useMediaController();
|
const { m } = useMediaController();
|
||||||
|
|
||||||
// NOTE: doesn't work
|
|
||||||
const stationsMedia = m('stations.main');
|
const stationsMedia = m('stations.main');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user