diff --git a/src/components/Header.tsx b/src/components/Header.tsx
index 839cac2..01e4cd2 100644
--- a/src/components/Header.tsx
+++ b/src/components/Header.tsx
@@ -1,9 +1,10 @@
import HeaderNav from "@/components/HeaderNav";
+import { navMenuData } from "@/data/menu";
import { toggleMobileMenu } from "@/utils/toggleMobileMenu";
import Image from "next/image";
import Link from "next/link";
-export default function Header1Multipage({ links }: any) {
+export default function Header({ links }: { links: typeof navMenuData }) {
return (
{/* Logo (* Add your text or image to the link tag. Use SVG or PNG image format.
diff --git a/src/components/HeaderNav.tsx b/src/components/HeaderNav.tsx
index ad6a192..58f8f8d 100644
--- a/src/components/HeaderNav.tsx
+++ b/src/components/HeaderNav.tsx
@@ -4,10 +4,11 @@ import addScrollspy from "@/utils/addScroll";
import { init_classic_menu_resize } from "@/utils/menuToggle";
import { scrollToElement } from "@/utils/scrollToElement";
import { closeMobileMenu, toggleMobileMenu } from "@/utils/toggleMobileMenu";
-import { useEffect, useRef, useState } from "react";
+import { Fragment, useEffect, useRef, useState } from "react";
import Link from "next/link";
+import { navMenuData } from "@/data/menu";
-export default function HeaderNav({ links, animateY = false }: any) {
+export default function HeaderNav({ links, animateY = false }: { links: typeof navMenuData; animateY?: boolean }) {
const [isDropdownOpen, setIsDropdownOpen] = useState([""]);
const dropdownRef = useRef(null);
@@ -36,8 +37,8 @@ export default function HeaderNav({ links, animateY = false }: any) {
return (
<>
{links[0].href?.includes("/") &&
- links.map((link: any, index: any) => (
- <>
+ links.map((link, index) => (
+
{!Array.isArray(link?.child) && (
@@ -98,7 +99,7 @@ export default function HeaderNav({ links, animateY = false }: any) {
{index != links.length - 1 && (
)}
- >
+
))}
{!links[0].href?.includes("/") &&
diff --git a/src/components/HeroOther.tsx b/src/components/HeroOther.tsx
new file mode 100644
index 0000000..2299ff3
--- /dev/null
+++ b/src/components/HeroOther.tsx
@@ -0,0 +1,59 @@
+import Image from "next/image";
+import { FaFacebook, FaLinkedin, FaTwitter } from "react-icons/fa";
+
+export interface HeroOtherProps {
+ title?: string;
+ img?: string;
+ createdAt?: string;
+ shareUrl?: Record
;
+}
+
+const shareIcons: Record = {
+ facebook: ,
+ linkedin: ,
+ twitter: ,
+};
+
+export default function HeroOther({ title, img, createdAt, shareUrl }: HeroOtherProps) {
+ return (
+
+ {/* */}
+
+
+
+ {/* */}
+
+
+
+
+
{title ?? ""}
+ {!!createdAt && (
+
+ )}
+
+ {!!shareUrl && (
+
+ )}
+
+
+
+
+
+
+ );
+}
diff --git a/src/components/Homepage.tsx b/src/components/Homepage.tsx
index 6bddcd1..a7a3f21 100644
--- a/src/components/Homepage.tsx
+++ b/src/components/Homepage.tsx
@@ -1,10 +1,9 @@
import Image from "next/image";
import Link from "next/link";
-import Testimonials from "./Testimonials";
import About from "./About";
import Contact from "./Contacts/Contact";
-export default function homepage({ onePage = false, dark = false }) {
+export default function homepage({ dark = false }) {
return (
<>
diff --git a/src/components/Pages/Page.tsx b/src/components/Pages/Page.tsx
index 89e0cd2..745e4f8 100644
--- a/src/components/Pages/Page.tsx
+++ b/src/components/Pages/Page.tsx
@@ -2,7 +2,7 @@ import { BeforeFooterBlock } from "@/components/Blocks/BeforeFooter";
import { RenderBlocks } from "@/components/Blocks/RenderBlocks";
import BlogDetail from "@/components/Blogs/BlogDetail";
import { fetchPageBySlug } from "@/services/payload/page";
-import Image from "next/image";
+import HeroOther from "@/components/HeroOther";
export interface PageProps {
slug: string | undefined;
@@ -22,43 +22,7 @@ export default async function Page({ slug }: PageProps) {
return (
<>
-
- {/* */}
- {!!page.heroImg?.url && (
-
-
-
- )}
- {!page?.heroImg?.url && (
-
-
-
- )}
- {/* */}
-
-
-
-
+
>
);
diff --git a/src/components/Pagination.tsx b/src/components/Pagination.tsx
index b96701a..5264712 100644
--- a/src/components/Pagination.tsx
+++ b/src/components/Pagination.tsx
@@ -1,7 +1,6 @@
"use client";
-import { usePathname, useRouter } from "next/navigation";
-import React from "react";
+import { usePathname } from "next/navigation";
interface PaginationProps {
page: number;
@@ -12,7 +11,6 @@ interface PaginationProps {
export default function Pagination({ page, hasPreviousPage, hasNextPage, totalPages }: PaginationProps) {
const activePage = page;
- const router = useRouter();
const pathName = usePathname();
// Function to handle page change
@@ -23,8 +21,7 @@ export default function Pagination({ page, hasPreviousPage, hasNextPage, totalPa
const url = new URL(window.location.href);
const searchParams = new URLSearchParams(url.search);
searchParams.set("page", `${page}`);
-
- router.push(`${pathName}/?${searchParams}`);
+ window.location.href = `${pathName}/?${searchParams}`;
};
const getPageNumbers = () => {
diff --git a/yarn.lock b/yarn.lock
index 7109e13..ef4854d 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -7504,8 +7504,8 @@ __metadata:
linkType: hard
"minipass-fetch@npm:^4.0.0":
- version: 4.0.0
- resolution: "minipass-fetch@npm:4.0.0"
+ version: 4.0.1
+ resolution: "minipass-fetch@npm:4.0.1"
dependencies:
encoding: "npm:^0.1.13"
minipass: "npm:^7.0.3"
@@ -7514,7 +7514,7 @@ __metadata:
dependenciesMeta:
encoding:
optional: true
- checksum: 10c0/7fa30ce7c373fb6f94c086b374fff1589fd7e78451855d2d06c2e2d9df936d131e73e952163063016592ed3081444bd8d1ea608533313b0149156ce23311da4b
+ checksum: 10c0/a3147b2efe8e078c9bf9d024a0059339c5a09c5b1dded6900a219c218cc8b1b78510b62dae556b507304af226b18c3f1aeb1d48660283602d5b6586c399eed5c
languageName: node
linkType: hard