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