diff --git a/frontend/src/App.css b/frontend/src/App.css index 1186370f..c8ed02c8 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -91,18 +91,6 @@ form button:hover { border-color: white; } -.about-section { - max-width: 800px; - margin: 2em auto; - text-align: left; - padding: 0 1em; -} - -.about-section p { - margin-bottom: 1em; - line-height: 1.6; -} - @media (max-width: 600px) { .about-section { font-size: 0.9em; diff --git a/frontend/src/components/modals/EditAddressModal.tsx b/frontend/src/components/modals/EditAddressModal.tsx index efc60b0a..65c7b9f6 100644 --- a/frontend/src/components/modals/EditAddressModal.tsx +++ b/frontend/src/components/modals/EditAddressModal.tsx @@ -1,8 +1,8 @@ import React, { useState } from "react"; +import { Input } from "@/components/ui/Input/Input"; import Modal from "@/components/ui/Modal"; import { Button } from "@/components/ui/button"; -import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { useAlertQueue } from "@/hooks/useAlertQueue"; import { useAuthentication } from "@/hooks/useAuth"; diff --git a/frontend/src/components/modals/EditRobotModal.tsx b/frontend/src/components/modals/EditRobotModal.tsx index d81445c9..db381962 100644 --- a/frontend/src/components/modals/EditRobotModal.tsx +++ b/frontend/src/components/modals/EditRobotModal.tsx @@ -1,5 +1,6 @@ import { useCallback, useEffect, useState } from "react"; +import { Input } from "@/components/ui/Input/Input"; import { Button } from "@/components/ui/button"; import { Dialog, @@ -7,7 +8,6 @@ import { DialogHeader, DialogTitle, } from "@/components/ui/dialog"; -import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Textarea } from "@/components/ui/textarea"; import { ApiError } from "@/lib/types/api"; diff --git a/frontend/src/components/modals/RegisterRobotModal.tsx b/frontend/src/components/modals/RegisterRobotModal.tsx index 86b3985b..8e5a6e53 100644 --- a/frontend/src/components/modals/RegisterRobotModal.tsx +++ b/frontend/src/components/modals/RegisterRobotModal.tsx @@ -2,6 +2,7 @@ import { useState } from "react"; import { FaPlus } from "react-icons/fa"; import { useNavigate } from "react-router-dom"; +import { Input } from "@/components/ui/Input/Input"; import { Button } from "@/components/ui/button"; import { Dialog, @@ -9,7 +10,6 @@ import { DialogHeader, DialogTitle, } from "@/components/ui/dialog"; -import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Textarea } from "@/components/ui/textarea"; import { useAlertQueue } from "@/hooks/useAlertQueue"; diff --git a/frontend/src/components/orders/OrderCard.tsx b/frontend/src/components/orders/OrderCard.tsx index 424d0d8c..2713d2c6 100644 --- a/frontend/src/components/orders/OrderCard.tsx +++ b/frontend/src/components/orders/OrderCard.tsx @@ -9,6 +9,12 @@ import { DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import type { OrderWithProduct } from "@/lib/types/orders"; +import { + activeStatuses, + canModifyStatuses, + orderStatuses, + redStatuses, +} from "@/lib/types/orders"; import { formatPrice } from "@/lib/utils/formatNumber"; import { normalizeStatus } from "@/lib/utils/formatString"; @@ -21,37 +27,6 @@ enum OrderStatus { DELIVERED = 4, } -const orderStatuses = [ - "processing", - "in_development", - "being_assembled", - "shipped", - "delivered", - "awaiting_final_payment", - "preorder_placed", - "cancelled", - "refunded", - "failed", -]; - -const activeStatuses = [ - "preorder_placed", - "processing", - "in_development", - "being_assembled", - "shipped", - "awaiting_final_payment", -]; - -const redStatuses = ["cancelled", "refunded", "failed"]; -const canModifyStatuses = [ - "preorder_placed", - "processing", - "in_development", - "being_assembled", - "awaiting_final_payment", -]; - const OrderCard: React.FC<{ orderWithProduct: OrderWithProduct }> = ({ orderWithProduct: initialOrderWithProduct, }) => { @@ -265,9 +240,7 @@ const OrderCard: React.FC<{ orderWithProduct: OrderWithProduct }> = ({ {isRedStatus && (
- {order.status === "failed" - ? "This order has failed." - : `This order has been ${normalizeStatus(order.status)}.`} + This order has been {normalizeStatus(order.status)}.
)} diff --git a/frontend/src/components/ui/input.tsx b/frontend/src/components/ui/input.tsx deleted file mode 100644 index 84607ef9..00000000 --- a/frontend/src/components/ui/input.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import * as React from "react"; - -import { cn } from "@/lib/utils"; - -export type InputProps = React.InputHTMLAttributes