Remove redundant code

This commit is contained in:
Kevin Kandlbinder 2021-04-12 12:57:10 +00:00 committed by GitHub
parent abb502c863
commit 1e89cccdc9
12 changed files with 375 additions and 377 deletions

View file

@ -66,8 +66,7 @@ const Navigation = ({ isHome }) => {
}
Navigation.propTypes = {
isHome: PropTypes.bool.isRequired,
module: PropTypes.string.isRequired
isHome: PropTypes.bool.isRequired
}
export default Navigation;

View file

@ -12,7 +12,7 @@ class Layout extends React.Component {
return (
<>
<SEO description={this.props.description} lang={this.props.lang} meta={this.props.meta} title={this.props.title} />
<Navigation isHome={this.props.transparentTopbar} module={this.props.module} />
<Navigation isHome={this.props.transparentTopbar} />
<div id="content" role="main">
{this.props.children}
</div>
@ -36,7 +36,6 @@ Layout.propTypes = {
lang: PropTypes.string,
meta: PropTypes.arrayOf(PropTypes.object),
title: PropTypes.string.isRequired,
module: PropTypes.string.isRequired,
transparentTopbar: PropTypes.bool,
children: PropTypes.any.isRequired
}

View file

@ -5,7 +5,7 @@ import Layout from "../layouts/default"
// markup
const NotFoundPage = () => {
return (
<Layout title="Not found" module="error">
<Layout title="Not found">
<section>
<article>
<h1>Page not found</h1>

View file

@ -44,7 +44,7 @@ function DonatePage(props) {
const { site, file } = props.data;
return (
<Layout module="donate" title={t("donate")} description={t("donationCatchphrase")}>
<Layout title={t("donate")} description={t("donationCatchphrase")}>
<section>
<article>
<h1><Trans>donate</Trans></h1>

View file

@ -29,7 +29,7 @@ function ThankYouPage(props) {
let contactEmail = site.siteMetadata.contactEmail;
const { t } = useI18next();
return (
<Layout module="donate" title={t("donate")}>
<Layout title={t("donate")}>
<section>
<article>
<h1><Trans>donateThanks</Trans></h1>

View file

@ -42,7 +42,7 @@ const FriendsPage = ({ data }) => {
}
return (
<Layout module="social" title={t("friends")} description={t("friendsDescription")}>
<Layout title={t("friends")} description={t("friendsDescription")}>
<section>
<article>
<h1><Trans>social</Trans></h1>

View file

@ -82,7 +82,7 @@ class IndexPage extends React.Component {
let meta = this.props.data.site.siteMetadata;
return (
<Layout title="Kevin Kandlbinder" module="home" transparentTopbar={true}>
<Layout title="Kevin Kandlbinder" transparentTopbar={true}>
<section className={styles.heroSection}>
<div className={styles.profile + " profile"}>
<div data-bg="url(https://cdn.kevink.dev/images/kevin/kevin-kandlbinder-03.jpg)" style={{ backgroundImage: "url(https://cdn.kevink.dev/images/kevin/kevin-kandlbinder-03.jpg)" }} className={styles.profileImage + " lazy"}></div>

View file

@ -21,7 +21,7 @@ export default function ImprintPage() {
const { t } = useI18next();
return (
<Layout module="legal" title={t("imprint")}>
<Layout title={t("imprint")}>
<section>
<article>
<h1><Trans>imprint</Trans></h1>

View file

@ -21,7 +21,7 @@ export default function DataSecPage() {
const { t } = useI18next();
return (
<Layout module="legal" title={t("datasec")}>
<Layout title={t("datasec")}>
<section>
<article>
<h1><Trans>datasec</Trans></h1>

View file

@ -21,7 +21,7 @@ export default function DisclaimerPage() {
const { t } = useI18next();
return (
<Layout module="legal" title={t("disclaimer")}>
<Layout title={t("disclaimer")}>
<section>
<article>
<h1><Trans>disclaimer</Trans></h1>

View file

@ -39,7 +39,7 @@ const ProjectsPage = ({ data }) => {
const { t } = useI18next();
return (
<Layout module="projects" title={t("projects")} description={t("projectsDescription")}>
<Layout title={t("projects")} description={t("projectsDescription")}>
<section>
<article>
<h1><Trans>projects</Trans></h1>

View file

@ -32,7 +32,7 @@ const SocialPage = ({ data }) => {
const { t } = useI18next();
return (
<Layout module="social" title={t("social")} description={t("socialDescription")}>
<Layout title={t("social")} description={t("socialDescription")}>
<section>
<article>
<h1><Trans>social</Trans></h1>