fix: API token deletion not reflected in cache until page reload (#1128)

Stops the API token copy card from continuing to appear when a newly created
token has been subsequently deleted.
This commit is contained in:
Chirag Chandrashekhar
2024-07-24 09:01:56 +05:30
committed by GitHub
parent c2374a9d65
commit 994f6867f5
3 changed files with 51 additions and 26 deletions

View File

@ -32,7 +32,7 @@ export default async function ApiTokensPage() {
<hr className="my-4" />
<ApiTokenForm className="max-w-xl" />
<ApiTokenForm className="max-w-xl" tokens={tokens} />
<hr className="mb-4 mt-8" />

View File

@ -26,7 +26,7 @@ export default async function ApiTokensPage({ params }: ApiTokensPageProps) {
const team = await getTeamByUrl({ userId: user.id, teamUrl });
let tokens: GetTeamTokensResponse | null = null;
let tokens: GetTeamTokensResponse | undefined = undefined;
try {
tokens = await getTeamTokens({ userId: user.id, teamId: team.id });
@ -63,7 +63,7 @@ export default async function ApiTokensPage({ params }: ApiTokensPageProps) {
<hr className="my-4" />
<ApiTokenForm className="max-w-xl" teamId={team.id} />
<ApiTokenForm className="max-w-xl" teamId={team.id} tokens={tokens} />
<hr className="mb-4 mt-8" />