Skip to content

Commit

Permalink
Remove extra console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
martink635 committed Jan 25, 2024
1 parent 236ab27 commit dc9d99a
Show file tree
Hide file tree
Showing 6 changed files with 763 additions and 241 deletions.
47 changes: 38 additions & 9 deletions components/sections/Connect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Container } from "@/components/common";
import content from "../../data/connect.json";
import GridContainer from "../common/GridContainer";
import Newsletter from "../Newsletter";
import Link from "next/link";

type ConnectProps = {
events: {
Expand Down Expand Up @@ -70,18 +71,46 @@ type EventLinkProps = {
add_to_calendar?: string;
};

const EventLink: React.FC<EventLinkProps> = ({ href = "", title }) => {
const EventLink: React.FC<EventLinkProps> = ({
href = "",
title,
add_to_calendar = "",
}) => {
return (
<div className="">
{href && href.length > 0 ? (
<a
href={href}
target="_blank"
rel="noreferrer"
className="text-sm font-semibold text-[#F6F7F9] transition hover:text-opacity-70"
>
{title}
</a>
<div className="flex items-center gap-4">
<a
href={href}
target="_blank"
rel="noreferrer"
className="text-sm font-semibold text-[#F6F7F9] transition hover:text-opacity-70"
>
{title}
</a>

{add_to_calendar.length > 0 && (
<Link href={add_to_calendar} target="_blank">
<span className="sr-only">Add to calendar</span>
<svg
className="w-4 h-4 hover:opacity-70"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 17 16"
>
<g fill="#F6F7F9" clipPath="url(#a)">
<path d="M8.467 14h-6V6h12v2h2V4a1 1 0 0 0-1-1h-2V1a1 1 0 0 0-2 0v2h-6V1a1 1 0 0 0-2 0v2h-2a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h7v-2Z" />
<path d="M15.967 12h-1.5v-1.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5V12h-1.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1.5v1.5a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5V14h1.5a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5Z" />
</g>
<defs>
<clipPath id="a">
<path fill="#fff" d="M.467 0h16v16h-16z" />
</clipPath>
</defs>
</svg>
</Link>
)}
</div>
) : (
<span className="font-medium md:text-lg ">{title}</span>
)}
Expand Down
2 changes: 1 addition & 1 deletion content/pages/why.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ sections:
type: default
title: Book of Swarm ->
background: orange
href: "https://www.ethswarm.org/The-Book-of-Swarm.pdf"
href: "https://papers.ethswarm.org/p/book-of-swarm/"
- template: cta
arrow: true
type: default
Expand Down
10 changes: 10 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ const nextConfig = {
},
],
},
async redirects() {
return [
// Basic redirect
{
source: "/The-Book-of-Swarm.pdf",
destination: "https://papers.ethswarm.org/p/book-of-swarm/",
permanent: false,
},
];
},
};

module.exports = nextConfig;
Loading

0 comments on commit dc9d99a

Please sign in to comment.