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) => {
|
||||
if (!user) return;
|
||||
toast
|
||||
.promise(
|
||||
toast.promise(
|
||||
fetch("/api/users", {
|
||||
method: "PATCH",
|
||||
headers: {
|
||||
@@ -16,8 +15,5 @@ export const updateUser = async (user: any) => {
|
||||
success: `Saved!`,
|
||||
error: "Changes could not save user :/",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
// location.reload();
|
||||
});
|
||||
);
|
||||
};
|
||||
|
||||
@@ -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