From 23ae0a618e9a8ab6ac5d47b11066dd1f0d040d2f Mon Sep 17 00:00:00 2001 From: Ben Lower Date: Mon, 15 Apr 2024 19:31:29 -0700 Subject: [PATCH] dark mode bug fix --- website/src/layouts/Base.astro | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/website/src/layouts/Base.astro b/website/src/layouts/Base.astro index a536f06..5b2d2b5 100644 --- a/website/src/layouts/Base.astro +++ b/website/src/layouts/Base.astro @@ -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'); }