mirror of
https://github.com/vercel/commerce.git
synced 2025-05-19 16:07:01 +00:00
Updates
This commit is contained in:
parent
21f4893b70
commit
9cab4ac2c6
@ -28,6 +28,7 @@ export default async function Header({ locale }: HeaderProps) {
|
|||||||
<div className="relative flex w-full items-center justify-between px-4 py-2 lg:px-8 2xl:px-16">
|
<div className="relative flex w-full items-center justify-between px-4 py-2 lg:px-8 2xl:px-16">
|
||||||
<div className="-translate-x-2 transform md:hidden">
|
<div className="-translate-x-2 transform md:hidden">
|
||||||
<Suspense fallback={<OpenMobileMenu />}>
|
<Suspense fallback={<OpenMobileMenu />}>
|
||||||
|
{/* @ts-ignore */}
|
||||||
<MobileMenuModal items={mainMenu} />
|
<MobileMenuModal items={mainMenu} />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</div>
|
</div>
|
||||||
@ -44,6 +45,7 @@ export default async function Header({ locale }: HeaderProps) {
|
|||||||
|
|
||||||
<div className="absolute left-1/2 top-1/2 hidden -translate-x-1/2 -translate-y-1/2 transform md:flex">
|
<div className="absolute left-1/2 top-1/2 hidden -translate-x-1/2 -translate-y-1/2 transform md:flex">
|
||||||
<Suspense>
|
<Suspense>
|
||||||
|
{/* @ts-ignore */}
|
||||||
<DesktopMenu items={mainMenu} />
|
<DesktopMenu items={mainMenu} />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
'use client';
|
|
||||||
|
|
||||||
import SanityImage from '../../ui/sanity-image';
|
import SanityImage from '../../ui/sanity-image';
|
||||||
|
|
||||||
interface USPSectionProps {
|
interface USPSectionProps {
|
||||||
@ -24,7 +22,7 @@ const USPSection = ({ usps }: USPSectionProps) => {
|
|||||||
alt={usp.name || 'USP image'}
|
alt={usp.name || 'USP image'}
|
||||||
width={96}
|
width={96}
|
||||||
height={96}
|
height={96}
|
||||||
sizes="96px"
|
size="96px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
'use client';
|
|
||||||
|
|
||||||
import { getClient } from '@/lib/sanity/sanity.client';
|
|
||||||
import { LiveQueryProvider } from '@sanity/preview-kit';
|
|
||||||
import { useMemo } from 'react';
|
|
||||||
|
|
||||||
export default function PreviewProvider({
|
|
||||||
children,
|
|
||||||
token
|
|
||||||
}: {
|
|
||||||
children: React.ReactNode;
|
|
||||||
token: string;
|
|
||||||
}) {
|
|
||||||
const client = useMemo(() => getClient({ token }), [token]);
|
|
||||||
return <LiveQueryProvider client={client}>{children}</LiveQueryProvider>;
|
|
||||||
}
|
|
@ -49,7 +49,7 @@ const Card: FC<CardProps> = ({ className, title, image, link, text, imageFormat
|
|||||||
className={imageClasses}
|
className={imageClasses}
|
||||||
image={image}
|
image={image}
|
||||||
alt={image.alt || ''}
|
alt={image.alt || ''}
|
||||||
sizes="(max-width: 1024px) 50vw, 90vw"
|
size="(max-width: 1024px) 50vw, 90vw"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -71,7 +71,7 @@ const Card: FC<CardProps> = ({ className, title, image, link, text, imageFormat
|
|||||||
className={imageClasses}
|
className={imageClasses}
|
||||||
image={image}
|
image={image}
|
||||||
alt={image.alt || ''}
|
alt={image.alt || ''}
|
||||||
sizes="(max-width: 1024px) 50vw, 20vw"
|
size="(max-width: 1024px) 50vw, 20vw"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
import type { Image } from 'sanity'
|
import type { Image } from 'sanity'
|
||||||
|
|
||||||
|
export interface MenuItem {
|
||||||
|
_type: string
|
||||||
|
slug?: string
|
||||||
|
title?: string
|
||||||
|
}
|
||||||
|
|
||||||
export interface HomePagePayload {
|
export interface HomePagePayload {
|
||||||
content?: []
|
content?: []
|
||||||
title?: string
|
title?: string
|
||||||
@ -63,5 +69,5 @@ export interface SearchPayload {
|
|||||||
export interface MainMenuPayload {
|
export interface MainMenuPayload {
|
||||||
title?: string
|
title?: string
|
||||||
_type?: string
|
_type?: string
|
||||||
items: []
|
items?: MenuItem[]
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user