From a606bbb7d75c5c62fb31aae86ed1ec5d4d750ef7 Mon Sep 17 00:00:00 2001 From: lingdocs <71590811+lingdocs@users.noreply.github.com> Date: Sat, 10 Sep 2022 23:46:27 +0400 Subject: [PATCH] fix front page link issue --- src/components/Link.js | 5 ++++- src/pages/LandingPage.tsx | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/Link.js b/src/components/Link.js index 4d3b587..4a2d8fe 100644 --- a/src/components/Link.js +++ b/src/components/Link.js @@ -24,6 +24,9 @@ export default function L(props) { style={props.style} >{props.children}; } + if (toA.startsWith("http")) { + return {props.children} + } // If it's a regular link return the regular router linker - return {props.children}; + return {props.children}; }; \ No newline at end of file diff --git a/src/pages/LandingPage.tsx b/src/pages/LandingPage.tsx index 3ad7d90..0fba0f4 100644 --- a/src/pages/LandingPage.tsx +++ b/src/pages/LandingPage.tsx @@ -1,4 +1,4 @@ -import { Link } from "react-router-dom"; +import Link from "../components/Link"; import Footer from "../components/Footer"; const content: { @@ -56,7 +56,7 @@ const LandingPage = () => {

Explore the wonderful language of Pashto

{content.map((block) => ( -
+

{block.title}

{block.subTitle}