Skip to content

Commit 985a960

Browse files
Fix: Delete account page
- Fix an issue where the delete account page was not working properly
1 parent 6dbd06b commit 985a960

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/settings/delete-account/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function DeleteAccountPage() {
1414
if(!token) redirect('/');
1515

1616
const profile: UserToken = jwtDecode(token);
17-
if(profile.roles !== "ROLE_DEMO") redirect('/')
17+
if(profile.roles == "ROLE_DEMO") redirect('/')
1818

1919
return (
2020
<div className="h-full flex flex-col">
@@ -28,7 +28,7 @@ export default function DeleteAccountPage() {
2828
</div>
2929
</MainContent>
3030
<div className="px-6 mb-6">
31-
<Link href="/api/auth/delete-account" className="rounded-xl bg-white/5 text-destructive text-md font-bold text-center py-3 mt-4 mb-2 block w-full max-w-screen-md mx-auto">Excluir conta</Link>
31+
<a href="/api/auth/delete-account" className="rounded-xl bg-white/5 text-destructive text-md font-bold text-center py-3 mt-4 mb-2 block w-full max-w-screen-md mx-auto">Excluir conta</a>
3232
<Link href="/settings" className="rounded-xl text-center py-3 block w-full max-w-screen-md mx-auto">Agora não</Link>
3333
</div>
3434
</Main>

0 commit comments

Comments
 (0)