fix: fix link

This commit is contained in:
Felix Schröter 2022-08-01 22:03:57 +02:00
parent b3acce6854
commit 5df4d34780
Signed by: felschr
GPG key ID: 671E39E6744C807D

View file

@ -1,5 +1,5 @@
import * as React from "react" import * as React from "react"
import { graphql, PageProps } from "gatsby" import { graphql, Link, PageProps } from "gatsby"
import Layout from "../../components/organisms/Layout" import Layout from "../../components/organisms/Layout"
const Blog = ({ data: { allMdx } }: PageProps<Queries.BlogQuery>) => { const Blog = ({ data: { allMdx } }: PageProps<Queries.BlogQuery>) => {
@ -7,9 +7,9 @@ const Blog = ({ data: { allMdx } }: PageProps<Queries.BlogQuery>) => {
return ( return (
<Layout pageTitle="Blog"> <Layout pageTitle="Blog">
{allMdx.edges.map(({ node: post }) => ( {allMdx.edges.map(({ node: post }) => (
<a href={`//${location.host}/blog/${post.slug}`}> <Link to={`/blog/${post.slug}`}>
<h2>{post.frontmatter?.title}</h2> <h2>{post.frontmatter?.title}</h2>
</a> </Link>
))} ))}
</Layout> </Layout>
) )