+
Why choose {SITE_NAME}?
-
-
-
-
-
Advanced Team
-
- We specialize in procuring high-quality used transmissions and engines as well as
- remanufactured engines and transmissions for the majority of truck and car makes and
- models. Whatever components you might need to repair or upgrade your vehicle, our
- advanced team of customer support specialists, sales leads, and automotive gurus can
- help you source the perfect quality engine or transmission for your needs.
-
+ {reasons.map((reason) => (
+
+
+
+
+
+
+
{reason.title}
+
+
-
-
-
-
-
-
Customer Support Staff
-
- With more than 20 years of experience providing support to our customers, our
- representatives have deep knowledge about all aspects of vehicles. We will quickly
- help you locate the exact compatible engine or transmission you need and get it to
- your commercial or residential address quickly. Our customer service team undergoes
- extensive training so that no matter what your problem is, we can fix it.
-
-
-
-
-
-
-
-
Replacement Process
-
- Car Part Planet is a partner with the most prominent automotive parts manufacturers
- and suppliers. The advanced online catalog we’ve created to support the customers of
- Car Part Planet is what you will use to find your exact part. Simply by using our
- Search Tool, you can find the exact engine or transmission swap for your ride. You can
- shop our smart catalog 24/7, no matter what time zone you’re in, for sourcing anything
- from a complete transmission replacement to a completely rebuilt engine, all at
- low-cost prices.
-
-
-
-
-
-
-
-
- Fast Shipping & Exclusive Warranty
-
-
- We can offer great prices because we operate more efficiently as an online retailer,
- so we pass this benefit to you with fast flat-rate shipping straight to your
- commercial or residential address when you order with us. You deserve proper coverage
- for your purchases from Car Part Planet, which is why we are proud to offer unlimited
- mile warranty protection for up to five years, depending on what you purchase. Give us
- a call today to discuss the details about our outstanding warranty terms or check out
- our designated warranty page for complete information.
-
-
-
+ ))}
);
diff --git a/components/page/accordion-block-item.tsx b/components/page/accordion-block-item.tsx
index c426b895e..e896dcdfa 100644
--- a/components/page/accordion-block-item.tsx
+++ b/components/page/accordion-block-item.tsx
@@ -1,19 +1,27 @@
'use client';
import { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/react';
-import { ChevronDownIcon } from '@heroicons/react/24/outline';
+import { ChevronRightIcon } from '@heroicons/react/24/outline';
import { ReactNode } from 'react';
-const AccordionBlockItem = ({ title, children }: { title: string; children: ReactNode }) => {
+const AccordionBlockItem = ({
+ title,
+ children,
+ defaultOpen
+}: {
+ title: string;
+ children: ReactNode;
+ defaultOpen?: boolean;
+}) => {
return (
-
+
- {title}
-
+ {title}
+
-
+
{children}
diff --git a/components/page/accordion-block.tsx b/components/page/accordion-block.tsx
index b0b785abc..00e0629f2 100644
--- a/components/page/accordion-block.tsx
+++ b/components/page/accordion-block.tsx
@@ -1,17 +1,17 @@
-import { getMetaobjectById, getMetaobjectsByIds } from 'lib/shopify';
+import { getMetaobject, getMetaobjectsByIds } from 'lib/shopify';
import { Metaobject } from 'lib/shopify/types';
import AccordionBlockItem from './accordion-block-item';
import PageContent from './page-content';
-const AccordionItem = async ({ id }: { id: string }) => {
- const accordionObject = await getMetaobjectById(id);
+const AccordionItem = async ({ id, defaultOpen }: { id: string; defaultOpen?: boolean }) => {
+ const accordionObject = await getMetaobject({ id });
if (!accordionObject) return null;
const content = await getMetaobjectsByIds(JSON.parse(accordionObject.accordion_content || '[]'));
return (
-
+
{content.map((block) => (
))}
@@ -19,7 +19,13 @@ const AccordionItem = async ({ id }: { id: string }) => {
);
};
-const AccordionBlock = async ({ block }: { block: Metaobject }) => {
+const AccordionBlock = ({
+ block,
+ defaultOpenIndex = 0
+}: {
+ block: Metaobject;
+ defaultOpenIndex?: number;
+}) => {
const accordionItemIds = JSON.parse(block.accordion || '[]') as string[];
return (
@@ -28,8 +34,8 @@ const AccordionBlock = async ({ block }: { block: Metaobject }) => {
{block.title}
)}
- {accordionItemIds.map((id) => (
-
+ {accordionItemIds.map((id, index) => (
+
))}
diff --git a/components/page/rich-text-display.tsx b/components/page/rich-text-display.tsx
index 4695953c3..169e983e2 100644
--- a/components/page/rich-text-display.tsx
+++ b/components/page/rich-text-display.tsx
@@ -40,7 +40,7 @@ const RichTextBlock = ({ block }: { block: Content }) => {
}
return (
-
+
{block.children.map((child, index) => (
))}
diff --git a/components/tag.tsx b/components/tag.tsx
index 7a071155f..10c538a6b 100644
--- a/components/tag.tsx
+++ b/components/tag.tsx
@@ -1,6 +1,15 @@
-const Tag = ({ text }: { text: string }) => {
+import clsx from 'clsx';
+
+const Tag = ({ text, invert }: { text: string; invert?: boolean }) => {
return (
-
{text}
+
+ {text}
+
);
};
diff --git a/lib/shopify/index.ts b/lib/shopify/index.ts
index 4e9402c9a..0869e45c1 100644
--- a/lib/shopify/index.ts
+++ b/lib/shopify/index.ts
@@ -562,13 +562,19 @@ export async function getMetaobjectsByIds(ids: string[]) {
return reshapeMetaobjects(res.body.data.nodes);
}
-export async function getMetaobjectById(id: string) {
+export async function getMetaobject({
+ id,
+ handle
+}: {
+ id?: string;
+ handle?: { handle: string; type: string };
+}) {
const res = await shopifyFetch<{
data: { metaobject: ShopifyMetaobject };
- variables: { id: string };
+ variables: { id?: string; handle?: { handle: string; type: string } };
}>({
query: getMetaobjectQuery,
- variables: { id }
+ variables: { id, handle }
});
return res.body.data.metaobject ? reshapeMetaobjects([res.body.data.metaobject])[0] : null;
diff --git a/lib/shopify/queries/metaobject.ts b/lib/shopify/queries/metaobject.ts
index 053b0cca4..ec26b4d29 100644
--- a/lib/shopify/queries/metaobject.ts
+++ b/lib/shopify/queries/metaobject.ts
@@ -20,8 +20,8 @@ export const getMetaobjectsQuery = /* GraphQL */ `
`;
export const getMetaobjectQuery = /* GraphQL */ `
- query getMetaobject($id: ID!) {
- metaobject(id: $id) {
+ query getMetaobject($id: ID, $handle: MetaobjectHandleInput) {
+ metaobject(id: $id, handle: $handle) {
id
type
fields {
diff --git a/lib/styles.ts b/lib/styles.ts
index cf30a870a..e858daf8a 100644
--- a/lib/styles.ts
+++ b/lib/styles.ts
@@ -4,6 +4,8 @@ export const colors = {
secondary: '#EF6C02',
blue: {
800: '#1C1F35',
- 200: '#666C89'
+ 200: '#666C89',
+ 500: '#2D3A7B',
+ 600: '#111C55'
}
};
diff --git a/package.json b/package.json
index 02514fd11..b4d7e64d6 100644
--- a/package.json
+++ b/package.json
@@ -28,6 +28,7 @@
"clsx": "^2.1.0",
"geist": "^1.3.0",
"lodash.get": "^4.4.2",
+ "lodash.kebabcase": "^4.1.1",
"lodash.startcase": "^4.4.0",
"next": "14.1.4",
"react": "18.2.0",
@@ -41,6 +42,7 @@
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.11",
"@types/lodash.get": "^4.4.9",
+ "@types/lodash.kebabcase": "^4.1.9",
"@types/lodash.startcase": "^4.4.9",
"@types/node": "20.11.30",
"@types/react": "18.2.72",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 0962faa59..f048a08ce 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -23,6 +23,9 @@ dependencies:
lodash.get:
specifier: ^4.4.2
version: 4.4.2
+ lodash.kebabcase:
+ specifier: ^4.1.1
+ version: 4.1.1
lodash.startcase:
specifier: ^4.4.0
version: 4.4.0
@@ -58,6 +61,9 @@ devDependencies:
'@types/lodash.get':
specifier: ^4.4.9
version: 4.4.9
+ '@types/lodash.kebabcase':
+ specifier: ^4.1.9
+ version: 4.1.9
'@types/lodash.startcase':
specifier: ^4.4.9
version: 4.4.9
@@ -759,6 +765,12 @@ packages:
'@types/lodash': 4.17.1
dev: true
+ /@types/lodash.kebabcase@4.1.9:
+ resolution: {integrity: sha512-kPrrmcVOhSsjAVRovN0lRfrbuidfg0wYsrQa5IYuoQO1fpHHGSme66oyiYA/5eQPVl8Z95OA3HG0+d2SvYC85w==}
+ dependencies:
+ '@types/lodash': 4.17.1
+ dev: true
+
/@types/lodash.startcase@4.4.9:
resolution: {integrity: sha512-C0M4DlN1pnn2vEEhLHkTHxiRZ+3GlTegpoAEHHGXnuJkSOXyJMHGiSc+SLRzBlFZWHsBkixe6FqvEAEU04g14g==}
dependencies:
@@ -2640,6 +2652,10 @@ packages:
resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==}
dev: true
+ /lodash.kebabcase@4.1.1:
+ resolution: {integrity: sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==}
+ dev: false
+
/lodash.merge@4.6.2:
resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==}
dev: true
diff --git a/public/faq-background.png b/public/faq-background.png
new file mode 100644
index 000000000..46ccb5bdd
Binary files /dev/null and b/public/faq-background.png differ
diff --git a/public/icons/customer-support.png b/public/icons/customer-support.png
deleted file mode 100644
index 71abe5ed1..000000000
Binary files a/public/icons/customer-support.png and /dev/null differ
diff --git a/public/icons/replacement.png b/public/icons/replacement.png
deleted file mode 100644
index 78272c2b2..000000000
Binary files a/public/icons/replacement.png and /dev/null differ
diff --git a/public/icons/shipping.png b/public/icons/shipping.png
deleted file mode 100644
index dc1851b29..000000000
Binary files a/public/icons/shipping.png and /dev/null differ
diff --git a/public/icons/team.png b/public/icons/team.png
deleted file mode 100644
index 08d84e5c0..000000000
Binary files a/public/icons/team.png and /dev/null differ