Skip to content

Commit

Permalink
Fix custom text
Browse files Browse the repository at this point in the history
  • Loading branch information
HauseMasterZ committed Dec 17, 2023
1 parent 7b2cf21 commit 31d1e53
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 102 deletions.
88 changes: 44 additions & 44 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef } from 'react';
import { Link } from 'react-router-dom';
import '../static/styles/styles.scss';

const Header = ({ toBeFocusedRef }) => {
const Header = ({ toBeFocusedRef, smoothCursorBlockRef }) => {
const [isDarkMode, setIsDarkMode] = useState(false);
const darkLightToggleElementRef = React.useRef(null);

Expand All @@ -11,9 +11,11 @@ const Header = ({ toBeFocusedRef }) => {
document.body.classList.toggle('dark');
if (!isDarkMode) {
document.body.style.backgroundColor = '#18191A';
smoothCursorBlockRef.current.style.backgroundColor = '#18191A';
localStorage.setItem('theme', 'dark');
} else {
document.body.style.backgroundColor = '#E4E9F7';
smoothCursorBlockRef.current.style.backgroundColor = '#E4E9F7';
localStorage.setItem('theme', 'light');
}
setIsDarkMode(!isDarkMode);
Expand Down
Loading

0 comments on commit 31d1e53

Please sign in to comment.