mirror of
https://github.com/vercel/commerce.git
synced 2025-07-25 11:11:24 +00:00
fix: remove unused code and trustpilot
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
@@ -4,7 +4,6 @@ import { Suspense } from 'react';
|
||||
import HomePageFilters, { HomePageFiltersPlaceholder } from './filters/hompage-filters';
|
||||
import DynamicHeroIcon from './hero-icon';
|
||||
import ImageDisplay from './page/image-display';
|
||||
import TrustPilot from './trust-pilot';
|
||||
|
||||
const Hero = async () => {
|
||||
const [offers, heroImage] = await Promise.all([
|
||||
@@ -66,17 +65,12 @@ const Hero = async () => {
|
||||
</div>
|
||||
<div aria-hidden="true" className="absolute inset-0 bg-dark opacity-80" />
|
||||
<div className="flex flex-col gap-10 px-6 py-32 text-center sm:py-64 lg:px-0">
|
||||
<div className="mx-auto hidden max-w-[800px] items-center justify-between gap-10 md:flex">
|
||||
<div className="relative flex items-center">
|
||||
<Image src="/best-price.svg" alt="Best Price" width={100} height={90} />
|
||||
<div className="ml-4 text-left text-white">
|
||||
<p className="tracking-wide">Best Price Guarantee</p>
|
||||
<p className="max-w-[200px] text-sm tracking-wide">
|
||||
We will match or beat any competitor's pricing.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<TrustPilot />
|
||||
<div className="relative mx-auto hidden flex-col items-center justify-center text-white md:flex">
|
||||
<Image src="/best-price.svg" alt="Best Price" width={100} height={90} />
|
||||
<p className="tracking-wide">Best Price Guarantee</p>
|
||||
<p className="text-sm tracking-wide">
|
||||
We will match or beat any competitor's pricing.
|
||||
</p>
|
||||
</div>
|
||||
<div className="relative mx-auto flex max-w-4xl flex-col items-center ">
|
||||
<Suspense fallback={<HomePageFiltersPlaceholder />}>
|
||||
|
@@ -1,19 +0,0 @@
|
||||
import { getPage } from 'lib/shopify';
|
||||
import PageContent from './page/page-content';
|
||||
|
||||
const HomePageContent = async () => {
|
||||
const page = await getPage('home-page');
|
||||
return (
|
||||
<div className="mx-auto max-w-7xl py-6 sm:px-6 lg:px-8">
|
||||
<div className="flex flex-col space-y-16">
|
||||
{page.metaobjects?.map((content) => (
|
||||
<div key={content.id}>
|
||||
<PageContent block={content} />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default HomePageContent;
|
@@ -1,34 +0,0 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect, useRef } from 'react';
|
||||
|
||||
const TrustPilot = () => {
|
||||
const ref = useRef(null);
|
||||
|
||||
useEffect(() => {
|
||||
// @ts-ignore
|
||||
if (window.Trustpilot) {
|
||||
// @ts-ignore
|
||||
window.Trustpilot.loadFromElement(ref.current);
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={ref}
|
||||
data-locale="en-US"
|
||||
data-template-id="53aa8807dec7e10d38f59f32"
|
||||
data-businessunit-id="58af38df0000ff00059d3de2"
|
||||
data-style-height="120px"
|
||||
data-style-width="100%"
|
||||
data-style-font-size="10px"
|
||||
data-theme="dark"
|
||||
>
|
||||
<a href="https://www.trustpilot.com/review/carpartplanet.com" target="_blank" rel="noopener">
|
||||
Trustpilot
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default TrustPilot;
|
Reference in New Issue
Block a user