From 6deacc27a90375aa0875d571ef94ad676f1f10c4 Mon Sep 17 00:00:00 2001 From: sy Date: Sat, 1 Apr 2023 02:43:52 +0800 Subject: [PATCH] chore: cleanup dev message --- components/WebMention.js | 5 ++--- styles/globals.css | 5 +++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/components/WebMention.js b/components/WebMention.js index ed81691e..48f0f5a7 100644 --- a/components/WebMention.js +++ b/components/WebMention.js @@ -22,14 +22,13 @@ const WebmentionCount = ({ target }) => { } const [counts, setCounts] = useState(initialCounts) const fetchCounts = async (target) => { - const responseData = await fetch(`https://webmention.io/api/count.json?target=${target}`) - console.log('!!!', responseData) + const responseData = await fetch(`https://webmention.io/api/count.json?target=${encodeURIComponent(target)}`) return (responseData.json) ? await responseData.json() : responseData } useEffect(() => { async function getCounts() { const responseCounts = await fetchCounts(target) - console.log('rere', responseCounts) + console.log(responseCounts) setCounts(responseCounts) } getCounts() diff --git a/styles/globals.css b/styles/globals.css index e17e9452..6aead9ed 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -249,6 +249,11 @@ nav { border-top: 1px solid rgba(0, 0, 0, 0.2); } +.webmention-counts { + padding: 16px 0; + font-weight: bold; +} + .webmention-counts .count { font-weight: bold; margin-right: .2rem;