Skip to content

The Open Source DocuSign Alternative.

ui, ui button component fix

Timur Ercandf047bc7499c
diff --git a/packages/features/updateUser.ts b/packages/features/updateUser.ts
index 9075c4e94..a09793363 100644
--- a/packages/features/updateUser.ts
+++ b/packages/features/updateUser.ts
@@ -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 :/",
+ }
+ );
};
diff --git a/packages/ui/components/button/Button.tsx b/packages/ui/components/button/Button.tsx
index e0527d9a0..507dbf27d 100644
--- a/packages/ui/components/button/Button.tsx
+++ b/packages/ui/components/button/Button.tsx
@@ -35,6 +35,7 @@ export function Button(props: any) {
) : (
<button
id={props.id}
+ type="button"
className={classNames(
baseStyles,
color === "primary" ? primaryStyles : secondaryStyles,