From f3fac51a9d5511b346531ab86785b5747ea80b80 Mon Sep 17 00:00:00 2001 From: dewanakl Date: Sat, 28 Dec 2024 22:26:35 +0700 Subject: [PATCH] fix: html best practice --- js/card.js | 8 +++----- js/like.js | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/js/card.js b/js/card.js index 1873d37..3af7427 100644 --- a/js/card.js +++ b/js/card.js @@ -58,11 +58,9 @@ export const card = (() => { const renderLike = (comment) => { return ` - `; }; diff --git a/js/like.js b/js/like.js index f985d22..d225e1f 100644 --- a/js/like.js +++ b/js/like.js @@ -20,8 +20,8 @@ export const like = (() => { const like = async (button) => { const id = button.getAttribute('data-uuid'); - const heart = button.firstElementChild.lastElementChild; - const info = button.firstElementChild.firstElementChild; + const info = button.firstElementChild; + const heart = button.lastElementChild; button.disabled = true;