fix warnings on cart page refresh

This commit is contained in:
2025-09-10 06:32:48 +03:00
parent cb11244d79
commit 229b3d7c27
2 changed files with 37 additions and 26 deletions

View File

@@ -8,6 +8,7 @@ import Cart from '../../_components/cart';
import { listProductTypes } from '@lib/data/products';
import CartTimer from '../../_components/cart/cart-timer';
import { Trans } from '@kit/ui/trans';
import { withI18n } from '~/lib/i18n/with-i18n';
export async function generateMetadata() {
const { t } = await createI18nServerInstance();
@@ -17,9 +18,9 @@ export async function generateMetadata() {
};
}
export default async function CartPage() {
async function CartPage() {
const cart = await retrieveCart().catch((error) => {
console.error(error);
console.error("Failed to retrieve cart", error);
return notFound();
});
@@ -50,3 +51,5 @@ export default async function CartPage() {
</PageBody>
);
}
export default withI18n(CartPage);