feat(MED-105): sort analysis result elements by date
This commit is contained in:
@@ -3,7 +3,6 @@ import { redirect } from 'next/navigation';
|
||||
import { listOrders } from '~/medusa/lib/data/orders';
|
||||
import { createI18nServerInstance } from '@/lib/i18n/i18n.server';
|
||||
import { listProductTypes } from '@lib/data/products';
|
||||
import { retrieveCustomer } from '@lib/data/customer';
|
||||
import { PageBody } from '@kit/ui/makerkit/page';
|
||||
import pathsConfig from '~/config/paths.config';
|
||||
import { Trans } from '@kit/ui/trans';
|
||||
@@ -21,11 +20,10 @@ export async function generateMetadata() {
|
||||
}
|
||||
|
||||
async function OrdersPage() {
|
||||
const customer = await retrieveCustomer();
|
||||
const orders = await listOrders().catch(() => null);
|
||||
const { productTypes } = await listProductTypes();
|
||||
|
||||
if (!customer || !orders || !productTypes) {
|
||||
if (!orders || !productTypes) {
|
||||
redirect(pathsConfig.auth.signIn);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user