added new warning
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user