From d52c589ed6250a2f7e94742c241a71299ad97439 Mon Sep 17 00:00:00 2001 From: neri Date: Sat, 14 Dec 2019 17:10:54 +0100 Subject: [PATCH] add edit link to sites --- src/components/footer.js | 12 +++++++++++- src/components/layout.js | 4 ++-- src/markdown-pages/datenschutz.mdx | 1 + src/markdown-pages/events.mdx | 1 + src/markdown-pages/home.mdx | 1 + src/markdown-pages/impressum.mdx | 1 + src/markdown-pages/kontakt.mdx | 1 + src/markdown-pages/treff.mdx | 1 + src/markdown-pages/verein.mdx | 1 + src/templates/siteTemplate.js | 8 +++++++- 10 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/components/footer.js b/src/components/footer.js index d910802..626eabf 100644 --- a/src/components/footer.js +++ b/src/components/footer.js @@ -2,9 +2,19 @@ import React from "react" import footerStyles from "./footer.module.css" import { Link } from "gatsby" -export default () => ( +export default ({ editLink }) => (
+ {editLink ? ( + + Seite bearbeiten + + ) : null} Impressum diff --git a/src/components/layout.js b/src/components/layout.js index 776a734..75fbd5a 100644 --- a/src/components/layout.js +++ b/src/components/layout.js @@ -3,10 +3,10 @@ import Nav from "../components/nav" import Footer from "../components/footer" import layoutStyles from "./layout.module.css" -export default ({ children }) => ( +export default ({ editLink, children }) => ( <>