From 9d1de8173f7f4835b209773175b077695416dfea Mon Sep 17 00:00:00 2001 From: Ariful Alam Date: Sat, 19 Mar 2022 00:53:02 +0600 Subject: [PATCH] Create HeadTagEditor component --- src/components/head-tag-editor/index.jsx | 77 ++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 src/components/head-tag-editor/index.jsx diff --git a/src/components/head-tag-editor/index.jsx b/src/components/head-tag-editor/index.jsx new file mode 100644 index 0000000..466c166 --- /dev/null +++ b/src/components/head-tag-editor/index.jsx @@ -0,0 +1,77 @@ +import { Fragment, useContext } from 'react'; +import { Helmet } from 'react-helmet-async'; +import PropTypes from 'prop-types'; +import { ThemeContext } from '../../contexts/ThemeContext'; +import config from '../../ezprofile.config'; +import { isThemeDarkish } from '../../helpers/utils'; + +const HeadTagEditor = (props) => { + const [theme] = useContext(ThemeContext); + + return ( + + {props.profile && ( + + {config.googleAnalytics?.id && ( + + )} + {config.googleAnalytics?.id && ( + + )} + Portfolio of {props.profile.name} + + + + + + + + + + + + + + + + + + + + )} + + ); +}; + +HeadTagEditor.propTypes = { + profile: PropTypes.object, +}; + +export default HeadTagEditor;