refactor: remove duplicate order status labels, use ORDER_STATUS_DATA as single source
This commit is contained in:
@@ -73,3 +73,7 @@ export const ORDER_STATUS_DATA: ReadonlyArray<OrderStatusData> = [
|
||||
export function getOrderStatusData(code: string): OrderStatusData | undefined {
|
||||
return ORDER_STATUS_DATA.find((s) => s.code === code)
|
||||
}
|
||||
|
||||
export const ORDER_STATUS_MAP: Record<string, string> = Object.fromEntries(
|
||||
ORDER_STATUS_DATA.map((s) => [s.code, s.label]),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user