Remove sign out button from settings page
Sign out is now only in menu page below Settings Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
fdd2a67f7a
commit
add108c920
1 changed files with 0 additions and 22 deletions
|
|
@ -38,23 +38,10 @@ export default function SettingsPage() {
|
||||||
const [inviteRole, setInviteRole] = useState("caregiver");
|
const [inviteRole, setInviteRole] = useState("caregiver");
|
||||||
const [inviteLoading, setInviteLoading] = useState(false);
|
const [inviteLoading, setInviteLoading] = useState(false);
|
||||||
const [familyName, setFamilyName] = useState("");
|
const [familyName, setFamilyName] = useState("");
|
||||||
const [signingOut, setSigningOut] = useState(false);
|
|
||||||
|
|
||||||
// Check if can invite more members
|
// Check if can invite more members
|
||||||
const canInvite = tier === "pro" || memberCount < 2;
|
const canInvite = tier === "pro" || memberCount < 2;
|
||||||
|
|
||||||
const handleSignOut = async () => {
|
|
||||||
if (!confirm("Are you sure you want to sign out?")) return;
|
|
||||||
setSigningOut(true);
|
|
||||||
try {
|
|
||||||
await fetch("/api/auth/signout", { method: "POST" });
|
|
||||||
router.push("/login");
|
|
||||||
} catch (err) {
|
|
||||||
console.error("Sign out failed:", err);
|
|
||||||
}
|
|
||||||
setSigningOut(false);
|
|
||||||
};
|
|
||||||
|
|
||||||
const themeOptions = [
|
const themeOptions = [
|
||||||
{ value: "light", label: "Light" },
|
{ value: "light", label: "Light" },
|
||||||
{ value: "dark", label: "Dark" },
|
{ value: "dark", label: "Dark" },
|
||||||
|
|
@ -324,15 +311,6 @@ export default function SettingsPage() {
|
||||||
<div className="font-medium">App Version</div>
|
<div className="font-medium">App Version</div>
|
||||||
<div className="text-sm text-gray-500">Tia v1.0.0</div>
|
<div className="text-sm text-gray-500">Tia v1.0.0</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Sign Out */}
|
|
||||||
<button
|
|
||||||
onClick={handleSignOut}
|
|
||||||
disabled={signingOut}
|
|
||||||
className="w-full p-4 mt-4 bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 rounded-xl font-medium disabled:opacity-50"
|
|
||||||
>
|
|
||||||
{signingOut ? "Signing out..." : "Sign Out"}
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue