Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
bugFix - fixed the save changes button bug by adding a condition
Ashraf6c4800ca2b19
diff --git a/pages/settings/general.tsx b/pages/settings/general.tsxindex e6a0c438..773561a0 100644--- a/pages/settings/general.tsx+++ b/pages/settings/general.tsx@@ -14,6 +14,8 @@ export default function General() {const [isTeamNameChanging, setTeamNameChanging] = useState<boolean>(false);const changeTeamName = async () => {+ if (teamInfo?.currentTeam?.name === teamNameInputRef.current?.value) return;+setTeamNameChanging(true);const response = await fetch(@@ -66,7 +68,11 @@ export default function General() {defaultValue={teamInfo?.currentTeam?.name}/></div>- <Button size={"lg"} onClick={changeTeamName}>+ <Button+ size={"lg"}+ onClick={changeTeamName}+ disabled={isTeamNameChanging}+ >{isTeamNameChanging ? "Saving..." : "Save changes"}</Button></div>