fix: react-doctor async-defer-await 10→0 (move await below guards), rerender-memo-with-default-value 13→0 (module-scope EMPTY_* defaults)
This commit is contained in:
@@ -56,6 +56,14 @@ type Order = {
|
||||
order_items?: OrderItem[];
|
||||
};
|
||||
|
||||
type Product = {
|
||||
id: string;
|
||||
name: string;
|
||||
price: number;
|
||||
type?: string | null;
|
||||
active?: boolean;
|
||||
};
|
||||
|
||||
type Stop = {
|
||||
id: string;
|
||||
city: string;
|
||||
@@ -91,10 +99,12 @@ const ChevronDownIcon = () => <ChevronDown className="h-4 w-4" strokeWidth={2} /
|
||||
const ChevronLeftIcon = () => <ChevronLeft className="h-4 w-4" strokeWidth={2} />;
|
||||
const ChevronRightIcon = () => <ChevronRight className="h-4 w-4" strokeWidth={2} />;
|
||||
|
||||
const EMPTY_PRODUCTS: Product[] = [];
|
||||
|
||||
export default function AdminOrdersPanel({
|
||||
initialOrders,
|
||||
initialStops,
|
||||
initialProducts = [],
|
||||
initialProducts = EMPTY_PRODUCTS,
|
||||
brandId,
|
||||
}: AdminOrdersPanelProps) {
|
||||
const { success: showSuccess, error: showError } = useToast();
|
||||
|
||||
Reference in New Issue
Block a user