Redirect to login page if require-login is enabled

This commit is contained in:
binwiederhier
2025-08-24 13:48:19 -04:00
parent ec1f97b726
commit 3de04b27ab
8 changed files with 20 additions and 36 deletions
+10 -16
View File
@@ -65,22 +65,16 @@ const maybeUpdateAccountSettings = async (payload) => {
}
};
const Preferences = () => {
if (!session.exists() or !config.requireLogin) {
window.location.href = routes.app;
return <></>;
}
return (
<Container maxWidth="md" sx={{ marginTop: 3, marginBottom: 3 }}>
<Stack spacing={3}>
<Notifications />
<Reservations />
<Users />
<Appearance />
</Stack>
</Container>
);
};
const Preferences = () => (
<Container maxWidth="md" sx={{ marginTop: 3, marginBottom: 3 }}>
<Stack spacing={3}>
<Notifications />
<Reservations />
<Users />
<Appearance />
</Stack>
</Container>
);
const Notifications = () => {
const { t } = useTranslation();