Prechádzať zdrojové kódy

显示网站底部模块

fogwind 4 dní pred
rodič
commit
fa4519a7e7

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 21
src/components/common/icons/service/AssuranceIcon.tsx


+ 0 - 17
src/components/common/icons/service/LeftArrow.tsx

@@ -1,17 +0,0 @@
-export const LeftArrow = () => {
-  return (
-    <svg
-      className="size-4"
-      fill="none"
-      height="14"
-      viewBox="0 0 15 14"
-      width="15"
-      xmlns="http://www.w3.org/2000/svg"
-    >
-      <path
-        d="M11.188 5.448V8.304H0.028V5.448H11.188ZM4.588 13.056L10.756 6.888L4.588 0.719999H8.596L14.764 6.888L8.596 13.056H4.588Z"
-        fill="white"
-      />
-    </svg>
-  );
-};

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 21
src/components/common/icons/service/SofaIcon.tsx


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 21
src/components/common/icons/service/TruckIcon.tsx


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 21
src/components/common/icons/service/VectorIcon.tsx


+ 1 - 19
src/components/common/skeleton/FilterSkeleton.tsx

@@ -1,4 +1,4 @@
-import { FC } from "react";
+import { type FC } from "react";
 
 export default function FilterListSkeleton() {
   return (
@@ -48,21 +48,3 @@ export const ProductCardSkeleton: FC = () => {
     </div>
   );
 };
-
-export const ServiceContentSkeleton: FC = () => {
-  return (
-    <div className="mx-auto my-12 w-full md:my-20 md:max-w-4xl">
-      <div className="flex items-center justify-center gap-6 max-lg:flex-wrap max-md:grid max-md:grid-cols-2 max-md:gap-x-2.5 max-md:text-center md:gap-10 lg:gap-20">
-        {Array.from({ length: 4 }).map((_, index) => (
-          <div
-            key={index}
-            className="flex animate-pulse flex-col items-center justify-center gap-3 max-md:gap-2.5 max-sm:px-2"
-          >
-            <div className="h-10 w-10 rounded-full bg-gray-300 dark:bg-gray-700" />
-            <div className="mt-2.5 h-4 w-36 rounded bg-gray-300 max-md:mt-0 max-md:w-32 max-sm:w-24 dark:bg-gray-700" />
-          </div>
-        ))}
-      </div>
-    </div>
-  );
-};

+ 0 - 83
src/components/layout/footer/ServiceContent.tsx

@@ -1,83 +0,0 @@
-"use client";
-
-import { FC, JSX } from "react";
-import { OptionDataTypes } from "@/types/types";
-import { ThemeCustomizationTranslationNode } from "@/types/theme/theme-customization";
-import { usePathname } from "next/navigation";
-import { safeParse } from "@utils/helper";
-import VectorIcon from "@components/common/icons/service/VectorIcon";
-import TruckIcon from "@components/common/icons/service/TruckIcon";
-import SofaIcon from "@components/common/icons/service/SofaIcon";
-import AssuranceIcon from "@components/common/icons/service/AssuranceIcon";
-
-export interface ServiceContentDataTypes {
-  name?: string;
-  serviceData: ThemeCustomizationTranslationNode[];
-}
-
-export interface ServiceContenRenderTypes {
-  serviceList: {
-    options: OptionDataTypes;
-  };
-}
-
-const ServiceContent: FC<ServiceContentDataTypes> = ({ serviceData }) => {
-  const pathname = usePathname();
-
-  if (
-    pathname === "/customer/login" ||
-    pathname === "/customer/register" ||
-    pathname === "/customer/forget-password"
-  ) {
-    return null;
-  }
-
-  return (
-    <div className="mx-auto my-16 mt-16 sm:mt-0 w-full lg:my-12 md:my-20 md:max-w-4xl px-4 py-8">
-      {serviceData?.slice(0, 1)?.map((service, index: number) => {
-        const options =
-          typeof service.options === "string"
-            ? safeParse(service.options)
-            : service.options;
-
-        return <ServiceCarouselRender key={index} serviceList={{ options }} />;
-      })}
-    </div>
-  );
-};
-
-const iconMapping: Record<string, JSX.Element> = {
-  "icon-truck": <VectorIcon />,
-  "icon-product": <TruckIcon />,
-  "icon-dollar-sign": <SofaIcon />,
-  "icon-support": <AssuranceIcon />,
-};
-
-const ServiceCarouselRender: FC<ServiceContenRenderTypes> = ({
-  serviceList,
-}) => {
-  const { options } = serviceList;
-  const { services } = options;
-
-  return (
-    <div className="flex items-center justify-center gap-6 max-lg:flex-wrap max-md:grid max-md:grid-cols-2 max-md:gap-x-4 max-md:gap-y-8 max-md:text-center md:gap-10 lg:gap-20">
-      {services?.map((list, index: number) => {
-        const iconKey = list?.service_icon;
-
-        return (
-          <div
-            key={index}
-            className="flex flex-col items-center justify-center gap-3 max-md:gap-3 max-md:px-4 max-md:py-2"
-          >
-            {iconMapping[iconKey]}
-            <p className="mt-2.5 max-w-[217px] text-center font-outfit text-sm font-medium max-md:mt-0 max-md:text-base max-sm:text-xs">
-              {list.description}
-            </p>
-          </div>
-        );
-      })}
-    </div>
-  );
-};
-
-export default ServiceContent;

+ 2 - 14
src/components/layout/footer/index.tsx

@@ -1,6 +1,5 @@
 import Link from "next/link";
 import { Suspense } from "react";
-import { isObject } from "@/utils/type-guards";
 import { getThemeCustomization } from "@/utils/bagisto";
 import LogoIcon from "@components/common/icons/LogoIcon";
 import FaceBookIcon from "@components/common/icons/social-icon/FaceBookIcon";
@@ -8,8 +7,6 @@ import InstaGramIcon from "@components/common/icons/social-icon/InstaGramIcon";
 import TwitterIcon from "@components/common/icons/social-icon/TwitterIcon";
 import Subscribe from "./Subscribe";
 import FooterMenu from "./FooterMenu";
-import ServiceContent from "./ServiceContent";
-import { ThemeCustomizationTranslationEdge } from "@/types/theme/theme-customization";
 const { COMPANY_NAME, SITE_NAME } = process.env;
 
 export default async function Footer() {
@@ -19,20 +16,11 @@ export default async function Footer() {
     "w-full h-6 animate-pulse rounded bg-neutral-200 dark:bg-neutral-700";
   const menu = await getThemeCustomization();
   const copyrightName = COMPANY_NAME || SITE_NAME || "";
-  const services =
-    menu?.services_content?.themeCustomizations?.edges?.[0]?.node;
+
 
   return (
     <>
-      {isObject(services) && services?.translations?.edges && (
-        <ServiceContent
-          name={services?.name}
-          serviceData={services?.translations?.edges?.map(
-            (edge: ThemeCustomizationTranslationEdge) => edge.node,
-          )}
-        />
-      )}
-      <footer className="hidden lg:block border-t border-neutral-200 text-sm text-neutral-500 dark:border-neutral-700 dark:text-neutral-400">
+      <footer className="border-t border-neutral-200 text-sm text-neutral-500 dark:border-neutral-700 dark:text-neutral-400">
         <div className="mx-auto flex w-full max-w-screen-2xl flex-col justify-between gap-6 gap-y-6 px-6 py-12 text-sm dark:border-neutral-700 min-[880px]:flex-row min-[880px]:gap-12 min-[880px]:gap-y-20 min-[880px]:px-4">
           <div className="flex flex-col gap-[14px]">
             <Link