From 2b83aafa961399959d154e7184d6d4e7cc21ebc6 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 30 Jul 2020 18:08:27 +0200 Subject: [PATCH] remove ad component --- config.js | 4 ---- src/@types/Site.d.ts | 4 ---- src/components/atoms/Ad.module.scss | 21 --------------------- src/components/atoms/Ad.tsx | 19 ------------------- src/components/templates/Post/index.tsx | 2 -- src/hooks/use-site-metadata.ts | 4 ---- 6 files changed, 54 deletions(-) delete mode 100644 src/components/atoms/Ad.module.scss delete mode 100644 src/components/atoms/Ad.tsx diff --git a/config.js b/config.js index e92f28d4..27f6e90d 100644 --- a/config.js +++ b/config.js @@ -42,9 +42,5 @@ module.exports = { darkModeConfig: { classNameDark: 'dark', classNameLight: 'light' - }, - ad: { - title: 'Ledger Nano X: Keep your crypto secure, everywhere.', - link: 'https://shop.ledger.com/pages/ledger-nano-x?r=3176d705002a' } } diff --git a/src/@types/Site.d.ts b/src/@types/Site.d.ts index 96fe5432..941d8788 100644 --- a/src/@types/Site.d.ts +++ b/src/@types/Site.d.ts @@ -30,8 +30,4 @@ export interface Site { classNameDark: string classNameLight: string } - ad: { - title: string - link: string - } } diff --git a/src/components/atoms/Ad.module.scss b/src/components/atoms/Ad.module.scss deleted file mode 100644 index 6ec2517a..00000000 --- a/src/components/atoms/Ad.module.scss +++ /dev/null @@ -1,21 +0,0 @@ -@import 'variables'; - -.ad { - font-style: italic; - display: block; - text-align: center; - position: relative; - margin-top: $spacer * 3; - margin-bottom: $spacer; - - &::before { - content: 'AFFILIATE'; - font-size: $font-size-mini; - position: absolute; - width: 100%; - left: 0; - top: 100%; - color: $text-color-light; - text-align: center; - } -} diff --git a/src/components/atoms/Ad.tsx b/src/components/atoms/Ad.tsx deleted file mode 100644 index 00302a7f..00000000 --- a/src/components/atoms/Ad.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React, { ReactElement } from 'react' -import styles from './Ad.module.scss' -import { useSiteMetadata } from '../../hooks/use-site-metadata' - -export default function Ad(): ReactElement { - const { ad } = useSiteMetadata() - - return ( - - {ad.title} - - ) -} diff --git a/src/components/templates/Post/index.tsx b/src/components/templates/Post/index.tsx index 8529135f..a3b141d5 100644 --- a/src/components/templates/Post/index.tsx +++ b/src/components/templates/Post/index.tsx @@ -11,7 +11,6 @@ import PostContent from './Content' import PostActions from './Actions' import PostLinkActions from './LinkActions' import PostMeta from './Meta' -import PostAd from '../../atoms/Ad' import PrevNext from './PrevNext' import styles from './index.module.scss' import { Image } from '../../atoms/Image' @@ -67,7 +66,6 @@ export default function Post({ {type === 'link' && } - diff --git a/src/hooks/use-site-metadata.ts b/src/hooks/use-site-metadata.ts index 3c1d81bd..aea3ec48 100644 --- a/src/hooks/use-site-metadata.ts +++ b/src/hooks/use-site-metadata.ts @@ -32,10 +32,6 @@ const query = graphql` classNameDark classNameLight } - ad { - title - link - } } } }