added new warning

This commit is contained in:
2026-05-18 23:23:43 +02:00
parent ce2d0bb329
commit d5b6c9665c
3 changed files with 21 additions and 5 deletions
+15 -3
View File
@@ -102,6 +102,12 @@ export const MainForm = () => {
const savedUser = Cookies.get("selectedUser");
if (savedUser) {
setSelectedUser(savedUser);
} else {
setMsg({
type: "warning",
headline: t("set-username-headline"),
text: t("set-username-text")
})
}
}, []);
@@ -442,10 +448,16 @@ export const MainForm = () => {
</Button>
)}
{/* Alert message */}
{/* Message */}
{msg && (
<Alert color={msg.type} sx={{ borderRadius: "12px" }}>
<strong>{msg.headline}:</strong> {msg.text}
<Alert
color={msg.type}
sx={{ flexDirection: "column", alignItems: "flex-start" }}
>
<Typography level="title-lg" sx={{ mb: 0.5 }}>
{msg.headline}
</Typography>
<Typography level="body-sm">{msg.text}</Typography>
</Alert>
)}
</form>