Skip to content

Commit

Permalink
fix: null
Browse files Browse the repository at this point in the history
  • Loading branch information
dewanakl committed Aug 29, 2024
1 parent 80f25b1 commit 8865da3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
1 change: 0 additions & 1 deletion js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ export const admin = (() => {

getUserDetail();
getStatUser();
comment.setEmpty();
comment.comment();
};

Expand Down
19 changes: 8 additions & 11 deletions js/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,14 @@ export const comment = (() => {
};

const comment = async () => {
if (!showHide.has('hidden')) {
showHide.set('hidden', []);
}

if (!showHide.has('show')) {
showHide.set('show', []);
}

card.renderLoading();
const comments = document.getElementById('comments');
const onNullComment = `<div class="h6 text-center fw-bold p-4 my-3 bg-theme-${theme.isDarkMode('dark', 'light')} rounded-4 shadow">Yuk bagikan undangan ini biar banyak komentarnya</div>`;
Expand Down Expand Up @@ -384,18 +392,7 @@ export const comment = (() => {
}
};

const setEmpty = () => {
if (!showHide.has('hidden')) {
showHide.set('hidden', []);
}

if (!showHide.has('show')) {
showHide.set('show', []);
}
};

return {
setEmpty,
cancel,
send,
edit,
Expand Down
1 change: 0 additions & 1 deletion js/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export const session = (() => {
config.set(key, value);
}

comment.setEmpty();
await comment.comment();
progress.complete('request');
}).catch(() => {
Expand Down

0 comments on commit 8865da3

Please sign in to comment.