mirror of
https://github.com/vercel/commerce.git
synced 2025-05-15 14:06:59 +00:00
Updated TypeScript to resolve async RSC error
This commit is contained in:
parent
5e1571e621
commit
336ae78a4b
@ -79,7 +79,6 @@ export default async function Page({ params }: PageParams) {
|
|||||||
<>
|
<>
|
||||||
<DynamicContentManager content={page?.content} />
|
<DynamicContentManager content={page?.content} />
|
||||||
<Suspense>
|
<Suspense>
|
||||||
{/* @ts-expect-error Server Component (https://github.com/vercel/next.js/issues/42292) */}
|
|
||||||
<Footer locale={params.locale} />
|
<Footer locale={params.locale} />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</>
|
</>
|
||||||
|
@ -39,7 +39,6 @@ export default async function ProductPage({ params }: CategoryPageParams) {
|
|||||||
<div className="mb-8 flex w-full flex-col px-4 lg:my-16 lg:px-8 2xl:px-16">
|
<div className="mb-8 flex w-full flex-col px-4 lg:my-16 lg:px-8 2xl:px-16">
|
||||||
<Text variant={'pageHeading'}>{title}</Text>
|
<Text variant={'pageHeading'}>{title}</Text>
|
||||||
<Suspense>
|
<Suspense>
|
||||||
{/* @ts-expect-error Server Component (https://github.com/vercel/next.js/issues/42292) */}
|
|
||||||
<Footer locale={params.locale} />
|
<Footer locale={params.locale} />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</div>
|
</div>
|
||||||
|
@ -35,7 +35,6 @@ export default async function HomePage({ params }: HomePageParams) {
|
|||||||
<>
|
<>
|
||||||
<DynamicContentManager content={data?.content} />
|
<DynamicContentManager content={data?.content} />
|
||||||
<Suspense>
|
<Suspense>
|
||||||
{/* @ts-expect-error Server Component (https://github.com/vercel/next.js/issues/42292) */}
|
|
||||||
<Footer locale={params.locale} />
|
<Footer locale={params.locale} />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</>
|
</>
|
||||||
|
@ -87,7 +87,6 @@ export default async function ProductPage({ params }: ProductPageParams) {
|
|||||||
/>
|
/>
|
||||||
<ProductView product={product} relatedProducts={[]} />
|
<ProductView product={product} relatedProducts={[]} />
|
||||||
<Suspense>
|
<Suspense>
|
||||||
{/* @ts-expect-error Server Component (https://github.com/vercel/next.js/issues/42292) */}
|
|
||||||
<Footer locale={params.locale} />
|
<Footer locale={params.locale} />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</>
|
</>
|
||||||
|
@ -31,12 +31,10 @@ const Header = ({ locale }: HeaderProps) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<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">
|
||||||
{/* @ts-expect-error Server Component (https://github.com/vercel/next.js/issues/42292) */}
|
|
||||||
<DesktopMenu locale={locale} />
|
<DesktopMenu locale={locale} />
|
||||||
</div>
|
</div>
|
||||||
<div className="flex justify-end md:w-1/3">
|
<div className="flex justify-end md:w-1/3">
|
||||||
<Suspense fallback={<OpenCart />}>
|
<Suspense fallback={<OpenCart />}>
|
||||||
{/* @ts-expect-error Server Component (https://github.com/vercel/next.js/issues/42292) */}
|
|
||||||
<Cart />
|
<Cart />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</div>
|
</div>
|
||||||
|
@ -69,6 +69,7 @@
|
|||||||
"prettier": "^2.8.8",
|
"prettier": "^2.8.8",
|
||||||
"prettier-plugin-tailwindcss": "^0.2.8",
|
"prettier-plugin-tailwindcss": "^0.2.8",
|
||||||
"tailwindcss": "^3.3.2",
|
"tailwindcss": "^3.3.2",
|
||||||
"typescript": "4.9.5"
|
"typescript": "^5.1.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2790
pnpm-lock.yaml
generated
2790
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user