1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-30 12:40:03 +02:00

Fix invalid marking of done nodes

This commit is contained in:
Kamran Ahmed
2021-12-09 23:13:37 +01:00
parent 98c093102f
commit d38798e187

View File

@@ -53,7 +53,7 @@ export function ContentDrawer(props: ContentDrawerProps) {
onClick={() => {
localStorage.setItem(groupId, 'done');
document
.querySelectorAll(`[data-group-id*="-${groupId}"]`)
.querySelectorAll(`[data-group-id$="-${groupId}"]`)
.forEach((item) => item?.classList?.add('done'));
onClose();
}}
@@ -76,7 +76,7 @@ export function ContentDrawer(props: ContentDrawerProps) {
onClick={() => {
localStorage.removeItem(groupId);
document
.querySelectorAll(`[data-group-id*="-${groupId}"]`)
.querySelectorAll(`[data-group-id$="-${groupId}"]`)
.forEach((item) => item?.classList?.remove('done'));
onClose();
}}