From 42f991da4fc3a4c7623c0a6bb361089e789686fa Mon Sep 17 00:00:00 2001 From: sanghun lee <57477415+sanghunlee-711@users.noreply.github.com> Date: Thu, 1 Feb 2024 08:20:13 +0900 Subject: [PATCH] [Feat] Visitor count with Hits service (#162) - #close #161 Co-authored-by: cloud --- src/components/Hits.js | 17 +++++++++++++++++ src/components/Nav.js | 3 ++- src/pages/Home/constants/element.js | 1 + src/pages/Home/index.js | 4 ++++ src/styles/style.css | 4 ++++ 5 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 src/components/Hits.js diff --git a/src/components/Hits.js b/src/components/Hits.js new file mode 100644 index 0000000..b1379d3 --- /dev/null +++ b/src/components/Hits.js @@ -0,0 +1,17 @@ +class Hits { + constructor({ $target }) { + this.$target = $target; + + this.render(); + } + + render() { + this.$target.innerHTML = /* html */ ` +
+ +
+ `; + } +} + +export default Hits; diff --git a/src/components/Nav.js b/src/components/Nav.js index 7f5c973..eee50c6 100644 --- a/src/components/Nav.js +++ b/src/components/Nav.js @@ -1,5 +1,6 @@ import { SHOW_ROUTE } from '../common/constants/route.js'; import BurgerNavPopup from './BurggerNavPopup.js'; + import Modal from './Modal.js'; class Nav { @@ -29,7 +30,7 @@ class Nav { render = () => { this.$wrapper.innerHTML = ` -

Sanghun(Cloud) Lee

+

Sanghun Lee