From 884e03b4c181b680675a361ba11ac51c749e74df Mon Sep 17 00:00:00 2001 From: f0x <f0x@cthu.lu> Date: Wed, 6 Nov 2024 14:04:35 +0100 Subject: [PATCH] fix html elements used for logout account-card --- web/source/settings/components/user-logout-card.tsx | 6 +++--- web/source/settings/lib/query/oauth/index.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/source/settings/components/user-logout-card.tsx b/web/source/settings/components/user-logout-card.tsx index f9acc9698..6a114f3b1 100644 --- a/web/source/settings/components/user-logout-card.tsx +++ b/web/source/settings/components/user-logout-card.tsx @@ -31,7 +31,7 @@ export default function UserLogoutCard() { if (isLoading) { return <Loading />; } - + if (!profile) { return <ErrorC error={new Error("account was undefined")} />; } @@ -39,9 +39,9 @@ export default function UserLogoutCard() { return ( <div className="account-card"> <img className="avatar" src={profile.avatar} alt="" /> - <h3 className="text-cutoff">{profile.display_name?.length > 0 ? profile.display_name : profile.acct}</h3> + <b className="text-cutoff">{profile.display_name.length > 0 ? profile.display_name : profile.acct}</b> <span className="text-cutoff">@{profile.username}@{instance?.account_domain}</span> - <a onClick={logoutQuery} href="#" aria-label="Log out" title="Log out" className="logout"> + <a onClick={() => void logoutQuery()} href="#" aria-label="Log out" title="Log out" className="logout"> <i className="fa fa-fw fa-sign-out" aria-hidden="true" /> </a> </div> diff --git a/web/source/settings/lib/query/oauth/index.ts b/web/source/settings/lib/query/oauth/index.ts index e151b0aee..baf20f748 100644 --- a/web/source/settings/lib/query/oauth/index.ts +++ b/web/source/settings/lib/query/oauth/index.ts @@ -188,7 +188,7 @@ const extended = gtsApi.injectEndpoints({ return { data: null }; }, }), - logout: build.mutation({ + logout: build.mutation<null, void>({ queryFn: (_arg, api) => { api.dispatch(oauthRemove()); return { data: null };