mirror of
https://github.com/documenso/documenso.git
synced 2025-11-12 15:53:02 +10:00
ui, ui button component fix
This commit is contained in:
@ -2,22 +2,18 @@ import toast from "react-hot-toast";
|
||||
|
||||
export const updateUser = async (user: any) => {
|
||||
if (!user) return;
|
||||
toast
|
||||
.promise(
|
||||
fetch("/api/users", {
|
||||
method: "PATCH",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify(user),
|
||||
}),
|
||||
{
|
||||
loading: "Saving Changes...",
|
||||
success: `Saved!`,
|
||||
error: "Changes could not save user :/",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
// location.reload();
|
||||
});
|
||||
toast.promise(
|
||||
fetch("/api/users", {
|
||||
method: "PATCH",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify(user),
|
||||
}),
|
||||
{
|
||||
loading: "Saving Changes...",
|
||||
success: `Saved!`,
|
||||
error: "Changes could not save user :/",
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
@ -35,6 +35,7 @@ export function Button(props: any) {
|
||||
) : (
|
||||
<button
|
||||
id={props.id}
|
||||
type="button"
|
||||
className={classNames(
|
||||
baseStyles,
|
||||
color === "primary" ? primaryStyles : secondaryStyles,
|
||||
|
||||
Reference in New Issue
Block a user