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:
Nora
2026-06-26 06:42:08 -06:00
parent 38bd3fcbc7
commit 3d5988afd0
18 changed files with 69 additions and 25 deletions
+11 -1
View File
@@ -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();