fix warnings on cart page refresh
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user