Public Access
fix(settings): keep the language and save settings one after the other
This commit is contained in:
1 parent
14dd59f9e0
commit
f605917874
25 files changed
+423
-98
No files matched your search
+3
-3
@@ -28,7 +28,7 @@ import {logout} from './utils/api.js';
|
||||
function App() {
|
||||
const {t} = useTranslation();
|
||||
const [isAuthenticated, setIsAuthenticated] = useState(false);
|
||||
const {appearance, syncAppearance, resetAppearance} = usePreferences();
|
||||
const {appearance, syncPreferences, resetAppearance} = usePreferences();
|
||||
|
||||
// Hooks for routing
|
||||
const navigate = useNavigate();
|
||||
@@ -42,8 +42,8 @@ function App() {
|
||||
|
||||
// On login and on page load; the cached look shows until Auth answers.
|
||||
useEffect(() => {
|
||||
if (isAuthenticated) syncAppearance();
|
||||
}, [isAuthenticated, syncAppearance]);
|
||||
if (isAuthenticated) syncPreferences();
|
||||
}, [isAuthenticated, syncPreferences]);
|
||||
|
||||
// Waits for Auth: a late logout answer would clear the cookies of a login that came after it.
|
||||
const handleLogout = async () => {
|
||||
|
||||
Reference in new issue
Block a user