Skip to content

Commit

Permalink
remove the tips container if there are no tips to show for the authPage
Browse files Browse the repository at this point in the history
  • Loading branch information
bmartel committed Nov 19, 2024
1 parent 014e4dd commit 68fa1f3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion label_studio/users/templates/users/new-ui/user_tips.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,16 @@
}

document.addEventListener('DOMContentLoaded', function() {
const _container = document.querySelector('.tips');
const _title = document.querySelector('.tips .title');
const _description = document.querySelector('.tips .description');

const selectedTip = getRandomTip();
if (!selectedTip) return;
if (!selectedTip) {
// Remove the tips container if there are no tips to show
_container.remove();
return;
}

const linkUrl = createURL(selectedTip.link.url, selectedTip.link.params)

Expand Down

0 comments on commit 68fa1f3

Please sign in to comment.