diff --git a/components/home-page/manufacturers.tsx b/components/home-page/manufacturers.tsx
index 23b93f4ab..b42ce5b79 100644
--- a/components/home-page/manufacturers.tsx
+++ b/components/home-page/manufacturers.tsx
@@ -17,7 +17,7 @@ const Manufacturers = async ({
return (
-
{`Browse ${title[variant]} By Manufacturer`}
+ {`Browse ${title[variant]} By Manufacturer`}
);
diff --git a/components/orders/actions.tsx b/components/orders/actions.tsx
index a7773bcf1..289649ea0 100644
--- a/components/orders/actions.tsx
+++ b/components/orders/actions.tsx
@@ -165,59 +165,23 @@ export const confirmOrder = async ({ order, content, formData }: ConfirmOrderOpt
}
};
-export async function returnCore() {
- // const rawFormData = [
- // getMetafieldValue(
- // 'coreReturnZip',
- // {
- // key: '',
- // value: formData.get('name') as string | null,
- // type: 'file_reference'
- // },
- // order
- // ),
- // getMetafieldValue(
- // 'warrantyActivationInstallation',
- // {
- // key: 'warranty_activation_installation',
- // value: installationFileId,
- // type: 'file_reference'
- // },
- // order
- // ),
- // getMetafieldValue(
- // 'warrantyActivationSelfInstall',
- // {
- // key: 'warranty_activation_self_install',
- // value: formData.get('warranty_activation_self_install') === 'on' ? 'true' : 'false',
- // type: 'boolean'
- // },
- // order
- // ),
- // getMetafieldValue(
- // 'warrantyActivationMileage',
- // {
- // key: 'warranty_activation_mileage',
- // value: formData.get('warranty_activation_mileage') as string | null,
- // type: 'number_integer'
- // },
- // order
- // ),
- // getMetafieldValue(
- // 'warrantyActivationVIN',
- // {
- // key: 'warranty_activation_vin',
- // value: formData.get('warranty_activation_vin') as string | null,
- // type: 'single_line_text_field'
- // },
- // order
- // )
- // ];
+export async function returnCore(order: Order, formData: FormData) {
+ const rawFormData = [
+ getMetafieldValue(
+ 'coreReturnZip',
+ {
+ key: '',
+ value: formData.get('name') as string | null,
+ type: 'file_reference'
+ },
+ order
+ )
+ ];
try {
- // await updateOrderMetafields({
- // orderId: order.id,
- // metafields: rawFormData
- // });
+ await updateOrderMetafields({
+ orderId: order.id,
+ metafields: rawFormData
+ });
revalidateTag(TAGS.orderMetafields);
} catch (error) {
diff --git a/components/orders/core-return-modal.tsx b/components/orders/core-return-modal.tsx
index c65aa1176..81a496b35 100644
--- a/components/orders/core-return-modal.tsx
+++ b/components/orders/core-return-modal.tsx
@@ -3,7 +3,7 @@ import { Order } from 'lib/shopify/types';
import { Button, Heading, Input } from 'components/ui';
import StatesCombobox from 'components/states-combobox';
import { useTransition } from 'react';
-// import { returnCore } from './actions';
+import { returnCore } from './actions';
export function CoreReturnModal({
isOpen,
@@ -18,8 +18,7 @@ export function CoreReturnModal({
async function submitCoreReturn(formData: FormData) {
startTransition(async () => {
- // returnCore(order, formData);
- console.log(formData);
+ returnCore(order, formData);
});
}
@@ -27,7 +26,7 @@ export function CoreReturnModal({