add dark mode classes and biome fixes

This commit is contained in:
Hunter275
2025-01-29 23:50:38 -05:00
parent 790f93322e
commit 2bdfbedeea
+3 -1
View File
@@ -17,6 +17,7 @@ import { useMemo } from "react";
export const Dashboard = () => { export const Dashboard = () => {
const { setConnectDialogOpen, setSelectedDevice } = useAppStore(); const { setConnectDialogOpen, setSelectedDevice } = useAppStore();
const { getDevices } = useDeviceStore(); const { getDevices } = useDeviceStore();
const { darkMode } = useAppStore();
const devices = useMemo(() => getDevices(), [getDevices]); const devices = useMemo(() => getDevices(), [getDevices]);
@@ -39,7 +40,8 @@ export const Dashboard = () => {
return ( return (
<li key={device.id}> <li key={device.id}>
<button <button
className="w-full px-4 py-4 sm:px-6 hover:bg-slate-50 focus:bg-slate-50 active:bg-slate-100" type="button"
className={`w-full px-4 py-4 sm:px-6 ${darkMode ? "hover:bg-slate-800 focus:bg-slate-400 active:bg-slate-600" : "hover:bg-slate-50 focus:bg-slate-50 active:bg-slate-100"}`}
onClick={() => { onClick={() => {
setSelectedDevice(device.id); setSelectedDevice(device.id);
}} }}