mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-30 12:40:03 +02:00
Fix sponsor opener
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
import { sponsorHidden } from '../../stores/page';
|
import { sponsorHidden } from '../../stores/page';
|
||||||
|
|
||||||
function showHideSponsor(isHidden) {
|
function showHideSponsor(shouldHide) {
|
||||||
const ad = document.querySelector('#sponsor-ad');
|
const ad = document.querySelector('#sponsor-ad');
|
||||||
if (!ad) {
|
if (!ad) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isHidden) {
|
if (shouldHide) {
|
||||||
ad.classList.add('hidden');
|
ad.classList.add('hidden');
|
||||||
ad.classList.remove('flex');
|
ad.classList.remove('flex');
|
||||||
} else {
|
} else {
|
||||||
|
@@ -84,7 +84,6 @@ export function TopicDetail() {
|
|||||||
// Close the topic detail when user clicks outside the topic detail
|
// Close the topic detail when user clicks outside the topic detail
|
||||||
useOutsideClick(topicRef, () => {
|
useOutsideClick(topicRef, () => {
|
||||||
setIsActive(false);
|
setIsActive(false);
|
||||||
sponsorHidden.set(false);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
useKeydown('Escape', () => {
|
useKeydown('Escape', () => {
|
||||||
|
Reference in New Issue
Block a user