diff --git a/components/loading-dots.tsx b/components/loading-dots.tsx
index 778348d00..ff2cafafb 100644
--- a/components/loading-dots.tsx
+++ b/components/loading-dots.tsx
@@ -4,7 +4,7 @@ import { VariantProps, tv } from 'tailwind-variants';
const loadingDots = tv({
slots: {
root: 'mx-2 inline-flex items-center',
- dots: 'bg-content inline-block animate-blink rounded-full'
+ dots: 'bg-content inline-block animate-blink rounded-full'
},
variants: {
size: {
diff --git a/components/orders/activate-warranty.tsx b/components/orders/activate-warranty.tsx
index 42afa2989..c894ea588 100644
--- a/components/orders/activate-warranty.tsx
+++ b/components/orders/activate-warranty.tsx
@@ -15,6 +15,11 @@ const ActivateWarranty = ({ order }: ActivateWarrantyModalProps) => {
const [isOpen, setIsOpen] = useState(false);
const isWarrantyActivated = order?.warrantyStatus?.value === WarrantyStatus.Activated;
const isPassDeadline = isBeforeToday(order?.warrantyActivationDeadline?.value);
+ const isOrderConfirmed = order?.orderConfirmation?.value;
+
+ if (!isOrderConfirmed) {
+ return null;
+ }
if (isWarrantyActivated) {
return ;
diff --git a/components/orders/order-confirmation-modal.tsx b/components/orders/order-confirmation-modal.tsx
index c698085ac..892f17a1a 100644
--- a/components/orders/order-confirmation-modal.tsx
+++ b/components/orders/order-confirmation-modal.tsx
@@ -189,10 +189,9 @@ export default function OrderConfirmationModal({
onClose: () => void;
}) {
const [loading, setLoading] = useState(true);
- const [submitting, setSubmitting] = useState(false);
const [orderConfirmationContent, setOrderConfirmationContent] =
useState();
- const [, startTransition] = useTransition();
+ const [submitting, startTransition] = useTransition();
const formRef = useRef(null);
useEffect(() => {
@@ -210,12 +209,11 @@ export default function OrderConfirmationModal({
const handleSubmit: FormEventHandler = (event) => {
event.preventDefault();
- setSubmitting(true);
const form = formRef.current;
if (!form) return;
- const formData = new FormData(form);
startTransition(async () => {
+ const formData = new FormData(form);
await confirmOrder({
order,
content: orderConfirmationContent!,
@@ -269,6 +267,7 @@ export default function OrderConfirmationModal({
color="primary"
disabled={submitting || loading}
isLoading={submitting}
+ loadingText="Submitting"
>
Submit
diff --git a/components/profile/popover.tsx b/components/profile/popover.tsx
index c8b605e2b..eaae0fbf5 100644
--- a/components/profile/popover.tsx
+++ b/components/profile/popover.tsx
@@ -22,11 +22,10 @@ function SignInButton({ message }: { message: string | null }) {
{message && {message}
}