Skip to content

Commit 61b64fe

Browse files
Todd GauglerTodd Gaugler
authored andcommitted
Dark mode fix
1 parent fed46f8 commit 61b64fe

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

ff-rankings-app/src/components/DraftTracker.jsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,24 @@ const DraftTrackerContent = () => {
219219
}, [players, currentDraftPick, numTeams, rosterSettings, autoDraftSettings, teamVariability,
220220
teamNames, draftStyle, isKeeperMode]);
221221

222+
// Apply theme to document body - ADD THIS useEffect
223+
useEffect(() => {
224+
document.body.style.backgroundColor = themeStyles.container.backgroundColor;
225+
document.body.style.color = themeStyles.text.primary;
226+
document.body.style.minHeight = '100vh';
227+
228+
// Also apply to html element for full coverage
229+
document.documentElement.style.backgroundColor = themeStyles.container.backgroundColor;
230+
231+
// Cleanup function to reset when component unmounts
232+
return () => {
233+
document.body.style.backgroundColor = '';
234+
document.body.style.color = '';
235+
document.body.style.minHeight = '';
236+
document.documentElement.style.backgroundColor = '';
237+
};
238+
}, [themeStyles]);
239+
222240
// Team mapping utilities for CSVs without team information
223241
const normalizePlayerName = (name) => {
224242
return name

0 commit comments

Comments
 (0)