diff --git a/frontend/src/app/for-lawyers/components/Hero.tsx b/frontend/src/app/for-lawyers/components/Hero.tsx
index fd7a36a..fc49816 100644
--- a/frontend/src/app/for-lawyers/components/Hero.tsx
+++ b/frontend/src/app/for-lawyers/components/Hero.tsx
@@ -2,9 +2,9 @@ import React from "react";
import clsx from "clsx";
import Image from "next/image";
-import Link from "next/link";
import Button from "@/components/Button";
+import CustomLink from "@/components/CustomLink";
import ExternalLink from "@/components/ExternalLink";
import { request } from "@/utils/graphQLClient";
@@ -24,16 +24,11 @@ const Hero: React.FC = async () => {
{subtitle}
{buttons.map((button) => (
-
+
-
+
))}
{
{title}
{subtitle}
-
+
-
+
-
+
-
+
-
+
{arrowLink.text}
{
alt="Arrow link image"
className="inline"
/>
-
+
{
{introduction.heading_text}
-
{introduction.link.text}
-
+
{introduction.closing_text}
diff --git a/frontend/src/app/home/components/TrustedBy.tsx b/frontend/src/app/home/components/TrustedBy.tsx
index 9f9a914..c259e0a 100644
--- a/frontend/src/app/home/components/TrustedBy.tsx
+++ b/frontend/src/app/home/components/TrustedBy.tsx
@@ -2,8 +2,8 @@ import React from "react";
import clsx from "clsx";
import Image from "next/image";
-import Link from "next/link";
+import CustomLink from "@/components/CustomLink";
import { request } from "@/utils/graphQLClient";
import { partnersQuery, PartnersQueryType } from "../queries/trusted-by";
@@ -33,12 +33,7 @@ const TrustedBy: React.FC = async () => {
)}
>
{institutions.map(({ name, link, image }) => (
-
+
{
height="1"
className="h-auto w-auto"
/>
-
+
))}
diff --git a/frontend/src/components/BrandAssets/Hero.tsx b/frontend/src/components/BrandAssets/Hero.tsx
index f9e5eb2..fddaf8e 100644
--- a/frontend/src/components/BrandAssets/Hero.tsx
+++ b/frontend/src/components/BrandAssets/Hero.tsx
@@ -1,11 +1,12 @@
import React from "react";
import Image from "next/image";
-import Link from "next/link";
import Button from "@/components/Button";
import { HeroQueryType } from "@/queries/brand-assets/hero";
+import CustomLink from "../CustomLink";
+
interface IHero {
heroData: HeroQueryType["brandAssetsPageHero"];
}
@@ -17,15 +18,11 @@ const Hero: React.FC = ({ heroData }) => {
{heroData.header}
{heroData.subtitle}
-
+
-
+
= ({
{logosPackageData.header}
{logosPackageData.subtitle}
-
+
-
+
= ({ title, subtitle, icon, url }) => {
return (
-
+
= ({ title, subtitle, icon, url }) => {
-
+
);
};
diff --git a/frontend/src/components/Community/hero.tsx b/frontend/src/components/Community/hero.tsx
index 52994d2..f7ac6e5 100644
--- a/frontend/src/components/Community/hero.tsx
+++ b/frontend/src/components/Community/hero.tsx
@@ -1,11 +1,12 @@
import React from "react";
import Image from "next/image";
-import Link from "next/link";
import Button from "@/components/Button";
import { HeroQueryType } from "@/queries/community/hero";
+import CustomLink from "../CustomLink";
+
interface IHero {
heroData: HeroQueryType["communityPageHero"];
}
@@ -21,16 +22,11 @@ const Hero: React.FC = ({ heroData }) => {
{subtitle}
{communityButtons.map((button) => (
-
+
-
+
))}
diff --git a/frontend/src/components/Cooperative/ReportSection/ReportCard.tsx b/frontend/src/components/Cooperative/ReportSection/ReportCard.tsx
index 9075a77..ac1a724 100644
--- a/frontend/src/components/Cooperative/ReportSection/ReportCard.tsx
+++ b/frontend/src/components/Cooperative/ReportSection/ReportCard.tsx
@@ -4,9 +4,9 @@ import { useState } from "react";
import clsx from "clsx";
import Image from "next/image";
-import Link from "next/link";
import Button from "@/components/Button";
+import CustomLink from "@/components/CustomLink";
import { Report } from "@/queries/cooperative/report-section";
import DropdownContainer from "./DropdownContainer";
@@ -53,7 +53,7 @@ const ReportCard: React.FC = ({
}}
/>
-
+
-
+
= ({ heroData }) => {
{subtitle}
{buttons.map((button) => (
-
+
-
+
))}
= ({ background, header, button }) => {
{header}
-
+
-
+
);
diff --git a/frontend/src/components/CustomLink.tsx b/frontend/src/components/CustomLink.tsx
new file mode 100644
index 0000000..b5db966
--- /dev/null
+++ b/frontend/src/components/CustomLink.tsx
@@ -0,0 +1,21 @@
+import Link from "next/link";
+
+interface ICustomLink extends React.ComponentProps {
+ children: React.ReactNode;
+}
+
+const CustomLink: React.FC = ({ children, href, ...props }) => (
+
+ {children}
+
+);
+
+const isExternal = (url: string) => /^https?:\/\//.test(url);
+
+export default CustomLink;
diff --git a/frontend/src/components/Earn/TabSection/CuratorTabContent/KlerosScoutSection.tsx b/frontend/src/components/Earn/TabSection/CuratorTabContent/KlerosScoutSection.tsx
index e620378..34ba3ce 100644
--- a/frontend/src/components/Earn/TabSection/CuratorTabContent/KlerosScoutSection.tsx
+++ b/frontend/src/components/Earn/TabSection/CuratorTabContent/KlerosScoutSection.tsx
@@ -1,8 +1,8 @@
import clsx from "clsx";
import Image from "next/image";
-import Link from "next/link";
import Button from "@/components/Button";
+import CustomLink from "@/components/CustomLink";
import ExternalLink from "@/components/ExternalLink";
import { KlerosScoutSection as IKlerosScoutSection } from "@/queries/earn/tabs-data";
@@ -44,14 +44,12 @@ const KlerosScoutSection: React.FC = ({
"flex items-center justify-center pt-3 md:pt-0",
)}
>
-
-
+
{arrowLinks.map((arrowLink) => (
diff --git a/frontend/src/components/Earn/TabSection/JurorTabContent/CourtsSection.tsx b/frontend/src/components/Earn/TabSection/JurorTabContent/CourtsSection.tsx
index 364ee96..1aabb4d 100644
--- a/frontend/src/components/Earn/TabSection/JurorTabContent/CourtsSection.tsx
+++ b/frontend/src/components/Earn/TabSection/JurorTabContent/CourtsSection.tsx
@@ -1,7 +1,7 @@
import Image from "next/image";
-import Link from "next/link";
import PlusIcon from "@/assets/svgs/icons/plus-icon.svg";
+import CustomLink from "@/components/CustomLink";
import Tag from "@/components/Tag";
import { Court } from "@/queries/earn/tabs-data";
import { ArrowLink } from "@/queries/navbar";
@@ -29,11 +29,7 @@ const CourtsSection: React.FC = ({
className="!text-base leading-none"
/>
))}
-
+
-
+
>
);
diff --git a/frontend/src/components/Earn/TabSection/JurorTabContent/EnterCourtSection.tsx b/frontend/src/components/Earn/TabSection/JurorTabContent/EnterCourtSection.tsx
index b90609c..ec28cc2 100644
--- a/frontend/src/components/Earn/TabSection/JurorTabContent/EnterCourtSection.tsx
+++ b/frontend/src/components/Earn/TabSection/JurorTabContent/EnterCourtSection.tsx
@@ -1,9 +1,9 @@
import React from "react";
import Image from "next/image";
-import Link from "next/link";
import Button from "@/components/Button";
+import CustomLink from "@/components/CustomLink";
import ExternalLink from "@/components/ExternalLink";
import { EnterCourtSection as IEnterCourtSection } from "@/queries/earn/tabs-data";
@@ -14,16 +14,11 @@ const EnterCourtSection: React.FC = ({
}) => {
return (
-
+
-
+
= ({ text, url, className }) => {
return (
-
{text}
@@ -27,7 +26,7 @@ const ExternalLink: React.FC = ({ text, url, className }) => {
alt="Arrow link image"
className="inline aspect-square w-4 md:w-6"
/>
-
+
);
};
export default ExternalLink;
diff --git a/frontend/src/components/Footer.tsx b/frontend/src/components/Footer.tsx
index 5d8ac29..cd8b4a2 100644
--- a/frontend/src/components/Footer.tsx
+++ b/frontend/src/components/Footer.tsx
@@ -2,12 +2,13 @@ import React from "react";
import clsx from "clsx";
import Image from "next/image";
-import Link from "next/link";
import Button from "@/components/Button";
import { FooterQueryType, footerQuery } from "@/queries/footer";
import { request } from "@/utils/graphQLClient";
+import CustomLink from "./CustomLink";
+
const hoverScaleUp = clsx("hover:scale-105 transform transition duration-75");
const Footer: React.FC = async () => {
@@ -26,15 +27,13 @@ const Footer: React.FC = async () => {
{title}
{links.map(({ name, url }) => (
-
{name}
-
+
))}
))}
@@ -42,15 +41,9 @@ const Footer: React.FC = async () => {
{socials.map(({ name, icon_white: icon, url }) => (
-
+
-
+
))}
diff --git a/frontend/src/components/ForBuilders/Hero.tsx b/frontend/src/components/ForBuilders/Hero.tsx
index 82a94d5..9a5c15e 100644
--- a/frontend/src/components/ForBuilders/Hero.tsx
+++ b/frontend/src/components/ForBuilders/Hero.tsx
@@ -1,12 +1,13 @@
import React from "react";
import Image from "next/image";
-import Link from "next/link";
import LinkArrow from "@/assets/svgs/icons/link-arrow.svg";
import Button from "@/components/Button";
import { HeroQueryType } from "@/queries/for-builders/hero";
+import CustomLink from "../CustomLink";
+
interface IHero {
heroData: HeroQueryType["forBuildersPageHero"];
}
@@ -18,24 +19,15 @@ const Hero: React.FC = ({ heroData }) => {
{heroData.title}
{heroData.subtitle}
-
+
-
+
{heroData.arrowLink?.map((arrowLink) => (
-
+
{arrowLink.text}
= ({ heroData }) => {
alt="Arrow link image"
className="inline"
/>
-
+
))}
diff --git a/frontend/src/components/ForBuilders/UseCasesSection/DAOSection/KeyChallenges/HowKlerosSolvesIt.tsx b/frontend/src/components/ForBuilders/UseCasesSection/DAOSection/KeyChallenges/HowKlerosSolvesIt.tsx
index aafefd4..32f70c8 100644
--- a/frontend/src/components/ForBuilders/UseCasesSection/DAOSection/KeyChallenges/HowKlerosSolvesIt.tsx
+++ b/frontend/src/components/ForBuilders/UseCasesSection/DAOSection/KeyChallenges/HowKlerosSolvesIt.tsx
@@ -2,8 +2,8 @@ import React from "react";
import clsx from "clsx";
import Image from "next/image";
-import Link from "next/link";
+import CustomLink from "@/components/CustomLink";
import Card from "@/components/Navbar/AppsDropdownContent/Card";
import { UseCasesQueryType } from "@/queries/for-builders/use-cases";
@@ -41,11 +41,9 @@ const HowKlerosSolvesIt: React.FC = ({ useCasesData }) => {
{useCasesData.solutionSections.partners.map((partner) => (
-
= ({ useCasesData }) => {
width={64}
height={64}
/>
-
+
))}
diff --git a/frontend/src/components/ForBuilders/UseCasesSection/DAOSection/LearnMore.tsx b/frontend/src/components/ForBuilders/UseCasesSection/DAOSection/LearnMore.tsx
index 630eec5..ab04e36 100644
--- a/frontend/src/components/ForBuilders/UseCasesSection/DAOSection/LearnMore.tsx
+++ b/frontend/src/components/ForBuilders/UseCasesSection/DAOSection/LearnMore.tsx
@@ -1,9 +1,9 @@
import React from "react";
import Image from "next/image";
-import Link from "next/link";
import LinkArrow from "@/assets/svgs/icons/link-arrow.svg";
+import CustomLink from "@/components/CustomLink";
import { UseCasesQueryType } from "@/queries/for-builders/use-cases";
interface ILearnMore {
@@ -12,10 +12,8 @@ interface ILearnMore {
const LearnMore: React.FC = ({ useCasesData }) => {
return (
-
@@ -28,7 +26,7 @@ const LearnMore: React.FC = ({ useCasesData }) => {
alt="Arrow link image"
className="inline"
/>
-
+
);
};
export default LearnMore;
diff --git a/frontend/src/components/IntegrateSection/LearnMore.tsx b/frontend/src/components/IntegrateSection/LearnMore.tsx
index 266eb0b..096dc73 100644
--- a/frontend/src/components/IntegrateSection/LearnMore.tsx
+++ b/frontend/src/components/IntegrateSection/LearnMore.tsx
@@ -1,21 +1,20 @@
import React from "react";
import Image from "next/image";
-import Link from "next/link";
import LinkArrow from "@/assets/svgs/icons/link-arrow.svg";
import { IntegrateQueryType } from "@/queries/integrate";
+import CustomLink from "../CustomLink";
+
interface ILearnMore {
integrateData: IntegrateQueryType["forBuildersPageIntegrateSection"];
}
const LearnMore: React.FC = ({ integrateData }) => {
return (
-
@@ -28,7 +27,7 @@ const LearnMore: React.FC = ({ integrateData }) => {
alt="Arrow link image"
className="inline"
/>
-
+
);
};
export default LearnMore;
diff --git a/frontend/src/components/LearnMore.tsx b/frontend/src/components/LearnMore.tsx
index 179b670..416147b 100644
--- a/frontend/src/components/LearnMore.tsx
+++ b/frontend/src/components/LearnMore.tsx
@@ -1,11 +1,12 @@
import React from "react";
import Image from "next/image";
-import Link from "next/link";
import Button from "@/components/Button";
import { ArrowLink } from "@/queries/navbar";
+import CustomLink from "./CustomLink";
+
interface ILearnMore {
title: string;
button: ArrowLink;
@@ -24,16 +25,11 @@ const LearnMore: React.FC = ({ title, button, background }) => {
{title}
-
+
-
+
= ({ solution, variant }) => {
return (
- = ({ solution, variant }) => {
)}
-
+
);
};
diff --git a/frontend/src/components/Navbar/AppsDropdownContent/index.tsx b/frontend/src/components/Navbar/AppsDropdownContent/index.tsx
index b1d3159..d65f1cf 100644
--- a/frontend/src/components/Navbar/AppsDropdownContent/index.tsx
+++ b/frontend/src/components/Navbar/AppsDropdownContent/index.tsx
@@ -1,8 +1,8 @@
import clsx from "clsx";
import Image from "next/image";
-import Link from "next/link";
import LinkArrow from "@/assets/svgs/icons/link-arrow.svg";
+import CustomLink from "@/components/CustomLink";
import { AppsSection } from "@/queries/navbar";
import Card from "./Card";
@@ -51,9 +51,7 @@ const AppsDropdownContent: React.FC = ({
variant="small"
/>
))}
-
@@ -65,7 +63,7 @@ const AppsDropdownContent: React.FC = ({
alt="Arrow link"
className="inline"
/>
-
+
);
diff --git a/frontend/src/components/Navbar/MobileMenu.tsx b/frontend/src/components/Navbar/MobileMenu.tsx
index 0975c45..62ed86d 100644
--- a/frontend/src/components/Navbar/MobileMenu.tsx
+++ b/frontend/src/components/Navbar/MobileMenu.tsx
@@ -16,6 +16,8 @@ import {
Social,
} from "@/queries/navbar";
+import CustomLink from "../CustomLink";
+
import AppsDropdownContent from "./AppsDropdownContent";
import ResourcesDropdownContent from "./ResourcesDropdownContent";
@@ -101,15 +103,11 @@ const MobileMenu: React.FC = ({
-
+
-
+
);
diff --git a/frontend/src/components/Navbar/ResourcesDropdownContent/index.tsx b/frontend/src/components/Navbar/ResourcesDropdownContent/index.tsx
index 0f60c26..2f0990b 100644
--- a/frontend/src/components/Navbar/ResourcesDropdownContent/index.tsx
+++ b/frontend/src/components/Navbar/ResourcesDropdownContent/index.tsx
@@ -1,7 +1,7 @@
import clsx from "clsx";
import Image from "next/image";
-import Link from "next/link";
+import CustomLink from "@/components/CustomLink";
import { ResourceSection, Social } from "@/queries/navbar";
const hoverScaleUp = clsx("transform transition duration-75");
@@ -48,13 +48,7 @@ const ResourcesDropdownContent: React.FC = ({
{section.links?.map((link) => (
-
-
- {link.name}
-
+ {link.name}
))}
@@ -69,11 +63,9 @@ const ResourcesDropdownContent: React.FC = ({
)}
>
{socials?.map((social) => (
-
= ({
width={24}
height={24}
/>
-
+
))}
diff --git a/frontend/src/components/Navbar/index.tsx b/frontend/src/components/Navbar/index.tsx
index bcf3e1a..502e88f 100644
--- a/frontend/src/components/Navbar/index.tsx
+++ b/frontend/src/components/Navbar/index.tsx
@@ -13,6 +13,8 @@ import Button from "@/components/Button";
import { NavbarQueryType } from "@/queries/navbar";
import { responsiveSize } from "@/styles/responsiveSize";
+import CustomLink from "../CustomLink";
+
import DesktopNavigation from "./DesktopNavigation";
import MobileMenu from "./MobileMenu";
@@ -75,15 +77,11 @@ const Navbar: React.FC = ({ navbarData }) => {
-
+
-
+
{menuOpen && (
diff --git a/frontend/src/components/PNKToken/BuySection/Exchanges.tsx b/frontend/src/components/PNKToken/BuySection/Exchanges.tsx
index 7d95006..b521071 100644
--- a/frontend/src/components/PNKToken/BuySection/Exchanges.tsx
+++ b/frontend/src/components/PNKToken/BuySection/Exchanges.tsx
@@ -1,6 +1,6 @@
import Image from "next/image";
-import Link from "next/link";
+import CustomLink from "@/components/CustomLink";
import { Exchange } from "@/queries/pnk-token/token-buy";
import { hoverEffect } from "@/styles";
@@ -12,12 +12,7 @@ const Exchanges: React.FC = ({ exchanges }) => {
return (
{exchanges.map((exchange) => (
-
+
= ({ exchanges }) => {
alt={exchange.name}
className={hoverEffect}
/>
-
+
))}
);
diff --git a/frontend/src/components/PNKToken/BuySection/FeaturedExchange.tsx b/frontend/src/components/PNKToken/BuySection/FeaturedExchange.tsx
index f02e4c6..4eba98f 100644
--- a/frontend/src/components/PNKToken/BuySection/FeaturedExchange.tsx
+++ b/frontend/src/components/PNKToken/BuySection/FeaturedExchange.tsx
@@ -1,7 +1,7 @@
import clsx from "clsx";
import Image from "next/image";
-import Link from "next/link";
+import CustomLink from "@/components/CustomLink";
import { Exchange } from "@/queries/pnk-token/token-buy";
import { hoverEffect } from "@/styles";
@@ -10,7 +10,7 @@ interface IFeaturedExchange {
}
const FeaturedExchange: React.FC = ({ exchange }) => {
return (
-
+
= ({ exchange }) => {
{exchange.name}
-
+
);
};
diff --git a/frontend/src/components/PNKToken/Explorers.tsx b/frontend/src/components/PNKToken/Explorers.tsx
index ab0289b..0e6c599 100644
--- a/frontend/src/components/PNKToken/Explorers.tsx
+++ b/frontend/src/components/PNKToken/Explorers.tsx
@@ -1,8 +1,9 @@
import Image from "next/image";
-import Link from "next/link";
import { HeroQueryType } from "@/queries/pnk-token/hero";
+import CustomLink from "../CustomLink";
+
interface IExplorers {
explorers: HeroQueryType["tokenExplorers"];
}
@@ -11,11 +12,9 @@ const Explorers: React.FC = ({ explorers }) => {
return (
{explorers.map((explorer) => (
-
= ({ explorers }) => {
alt={explorer.name}
className="!w-min"
/>
-
+
))}
);
diff --git a/frontend/src/components/PNKToken/Hero.tsx b/frontend/src/components/PNKToken/Hero.tsx
index 7308cb3..2331eb8 100644
--- a/frontend/src/components/PNKToken/Hero.tsx
+++ b/frontend/src/components/PNKToken/Hero.tsx
@@ -1,11 +1,12 @@
import React from "react";
import Image from "next/image";
-import Link from "next/link";
import Button from "@/components/Button";
import { HeroQueryType } from "@/queries/pnk-token/hero";
+import CustomLink from "../CustomLink";
+
import Explorers from "./Explorers";
interface IHero {
@@ -22,15 +23,11 @@ const Hero: React.FC = ({ heroData }) => {
{subtitle}
-
+
-
+
diff --git a/frontend/src/components/ResearchDevelopment/Hero.tsx b/frontend/src/components/ResearchDevelopment/Hero.tsx
index ce2f7b2..c307122 100644
--- a/frontend/src/components/ResearchDevelopment/Hero.tsx
+++ b/frontend/src/components/ResearchDevelopment/Hero.tsx
@@ -1,11 +1,11 @@
import React from "react";
import Image from "next/image";
-import Link from "next/link";
import Button from "@/components/Button";
import { HeroQueryType } from "@/queries/research-development/hero";
+import CustomLink from "../CustomLink";
import ExternalLink from "../ExternalLink";
interface IHero {
@@ -24,16 +24,11 @@ const Hero: React.FC = ({ heroData }) => {
{subtitle}
{buttons.map((button) => (
-
+
-
+
))}
diff --git a/frontend/src/components/ResearchDevelopment/TabSection/FellowshipTabContent/Testimonials/TestimonialCard.tsx b/frontend/src/components/ResearchDevelopment/TabSection/FellowshipTabContent/Testimonials/TestimonialCard.tsx
index 795e3d3..5f6c467 100644
--- a/frontend/src/components/ResearchDevelopment/TabSection/FellowshipTabContent/Testimonials/TestimonialCard.tsx
+++ b/frontend/src/components/ResearchDevelopment/TabSection/FellowshipTabContent/Testimonials/TestimonialCard.tsx
@@ -1,10 +1,10 @@
import Image from "next/image";
-import Link from "next/link";
+import CustomLink from "@/components/CustomLink";
import { Testimonial } from "@/queries/research-development/tabs-data";
const TestimonialCard: React.FC
= ({ url, thumbnail }) => (
-
+
= ({ url, thumbnail }) => (
className="object-cover"
/>
-
+
);
export default TestimonialCard;
diff --git a/frontend/src/components/ResearchDevelopment/TabSection/ResearchTabContent/KlerosBook.tsx b/frontend/src/components/ResearchDevelopment/TabSection/ResearchTabContent/KlerosBook.tsx
index 9f8f585..ee5d19a 100644
--- a/frontend/src/components/ResearchDevelopment/TabSection/ResearchTabContent/KlerosBook.tsx
+++ b/frontend/src/components/ResearchDevelopment/TabSection/ResearchTabContent/KlerosBook.tsx
@@ -1,8 +1,8 @@
import clsx from "clsx";
import Image from "next/image";
-import Link from "next/link";
import Button from "@/components/Button";
+import CustomLink from "@/components/CustomLink";
import { KlerosBook as IKlerosBook } from "@/queries/research-development/tabs-data";
const KlerosBook: React.FC = ({
@@ -35,14 +35,9 @@ const KlerosBook: React.FC = ({
{downloadFormats.map((format) => (
-
+
-
+
))}