fix front page link issue

This commit is contained in:
lingdocs 2022-09-10 23:46:27 +04:00
parent e9e6193784
commit a606bbb7d7
2 changed files with 6 additions and 3 deletions

View File

@ -24,6 +24,9 @@ export default function L(props) {
style={props.style}
>{props.children}</HashLink>;
}
if (toA.startsWith("http")) {
return <a href={toA} style={props.style} className={props.className}>{props.children}</a>
}
// If it's a regular link return the regular router linker
return <Link to={toA} style={props.style}>{props.children}</Link>;
return <Link to={toA} style={props.style} className={props.className}>{props.children}</Link>;
};

View File

@ -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 = () => {
<p className="lead">Explore the wonderful language of Pashto</p>
{content.map((block) => (
<Link to={block.link} className="plain-link">
<div className="card clickable my-2" style={{ maxWidth: "600px"}}>
<div className="card clickable my-2 plain-link" style={{ maxWidth: "600px"}}>
<div className="card-body">
<h2 className="card-title">{block.title}</h2>
<h5 className="card-subtitle mb-2 text-muted">{block.subTitle}</h5>