feat: improve config UI (#69)
* add first concept * completed configuration ui update * add button for testing email configuration * improve mobile layout * add migration * run formatter * delete unnecessary modal * remove unused comment
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { Button } from "@mantine/core";
|
||||
import useUser from "../../../hooks/user.hook";
|
||||
import configService from "../../../services/config.service";
|
||||
import toast from "../../../utils/toast.util";
|
||||
|
||||
const TestEmailButton = () => {
|
||||
const { user } = useUser();
|
||||
|
||||
return (
|
||||
<Button
|
||||
variant="light"
|
||||
onClick={() =>
|
||||
configService
|
||||
.sendTestEmail(user!.email)
|
||||
.then(() => toast.success("Email sent successfully"))
|
||||
.catch(() =>
|
||||
toast.error(
|
||||
"Failed to send the email. Please check the backend logs for more information."
|
||||
)
|
||||
)
|
||||
}
|
||||
>
|
||||
Send test email
|
||||
</Button>
|
||||
);
|
||||
};
|
||||
export default TestEmailButton;
|
||||
Reference in New Issue
Block a user