Skip to content

Commit

Permalink
dark mode bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benlower committed Apr 16, 2024
1 parent be29bbf commit 23ae0a6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions website/src/layouts/Base.astro
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,20 @@ const {
) {
localStorage.setItem('dark-mode', 'true');
document.querySelector('html')?.classList.add('dark');

// Change the data grid
const myElement = document.getElementById('myGrid');
myElement.classList.remove('ag-theme-quartz');
myElement.classList.add('ag-theme-quartz-dark');

} else {
localStorage.setItem('dark-mode', 'false');
document.querySelector('html')?.classList.remove('dark');

// Change the data grid
const myElement = document.getElementById('myGrid');
myElement.classList.remove('ag-theme-quartz-dark');
myElement.classList.add('ag-theme-quartz');
}
</script>
</head>
Expand Down

0 comments on commit 23ae0a6

Please sign in to comment.