Skip to content

Commit d93edab

Browse files
author
onesine
committed
Changing the time of the automatic theme switch
1 parent a8a41d4 commit d93edab

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
} else {
3030
const hour = new Date().getHours();
3131

32-
if (hour > 5 && hour < 20) {
32+
if (hour > 5 && hour < 18) {
3333
document.body.className = bodyTheme["Light"]
3434
} else {
3535
document.body.className = bodyTheme["Dark"]

src/helpers/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function getTheme(theme) {
1111
export function getDefaultTheme() {
1212
const hour = new Date().getHours();
1313

14-
if (hour > 5 && hour < 20) {
14+
if (hour > 5 && hour < 18) {
1515
return LIGHT;
1616
}
1717
return DARK;

0 commit comments

Comments
 (0)