From 673bb83ab842dcf5d72ae01cb92786ecab4c7bab Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Tue, 15 Oct 2019 07:04:24 +0300 Subject: [PATCH] Footer component moved to ts --- src/components/Footer.js | 44 ----------------------------- src/components/Footer/index.tsx | 49 +++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 44 deletions(-) delete mode 100644 src/components/Footer.js create mode 100644 src/components/Footer/index.tsx diff --git a/src/components/Footer.js b/src/components/Footer.js deleted file mode 100644 index 07a7e01a..00000000 --- a/src/components/Footer.js +++ /dev/null @@ -1,44 +0,0 @@ -const React = require('react') - -const mailto = email => `mailto:${email}` -const currentYear = () => (new Date()).getFullYear() - -const Footer = ({children, address, telephone, email, showAuthor}) => ( - -) - -const Author = () => ( - - Разработка и поддержка сайта — - - www.tmshv.ru - - -) - -const Copyright = ({yearStart, yearEnd}) => ( - © {yearStart}—{yearEnd} Шлиссельбургская детская художественная школа -) - -module.exports = Footer diff --git a/src/components/Footer/index.tsx b/src/components/Footer/index.tsx new file mode 100644 index 00000000..a3e69d0a --- /dev/null +++ b/src/components/Footer/index.tsx @@ -0,0 +1,49 @@ +import * as React from 'react' + +const mailto = email => `mailto:${email}` +const currentYear = () => (new Date()).getFullYear() + +export interface IFooterProps { + address: string + telephone: string + email: string + showAuthor: boolean +} + +export const Footer: React.FC = props => ( +
+
+
+

Контактная информация

+

Адрес: {props.address}

+

Телефон: {props.telephone}

+

Почта: {props.email}

+

Вконтакте: shlisselburghudozka

+

Инстаграм: hudozka

+
+
+ +
+ + {!props.showAuthor ? null : ( + + )} +
+
+) + +const Author = () => ( + + Разработка и поддержка сайта — + + www.tmshv.ru + + +) + +const Copyright = ({ yearStart, yearEnd }) => ( + © {yearStart}—{yearEnd} Шлиссельбургская детская художественная школа +)