Skip to content

Commit 44549e2

Browse files
fix: dark-mode-on-login-page (#6810)
1 parent 380fecd commit 44549e2

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

frontend/common/stores/account-store.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { matchPath } from 'react-router-dom'
2-
2+
import { storageGet, storageSet } from 'common/safeLocalStorage'
33
const Dispatcher = require('../dispatcher/dispatcher')
44
const BaseStore = require('./base/_store')
55
const data = require('../data/base/_data')
@@ -348,7 +348,11 @@ const controller = {
348348
store.loaded()
349349
} else if (!user) {
350350
store.ephemeral_token = null
351+
const darkMode = storageGet('dark_mode')
351352
AsyncStorage.clear()
353+
if (darkMode) {
354+
storageSet('dark_mode', darkMode)
355+
}
352356
if (!data.token) {
353357
return
354358
}

frontend/web/components/pages/HomePage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ const HomePage: React.FC = () => {
351351
{!isSignup ? (
352352
<>
353353
<Card
354-
className='mb-3 bg-white p-3'
354+
className='mb-3 bg-body p-3'
355355
contentClassName={classNames(
356356
'd-flex flex-column gap-3',
357357
{ 'bg-light200': preventEmailPassword },

0 commit comments

Comments
 (0)