Skip to content

Commit 23a739a

Browse files
Remove: account danger zone component + account deletion action (e2b-dev#83)
This pr disables account deletions from within the dashboard by: - removing the "Danger Zone" component from [/dashboard/account](https://e2b.dev/dashboard/account) page - removing the `deleteAccountAction` from the server side
1 parent cd1e962 commit 23a739a

3 files changed

Lines changed: 0 additions & 118 deletions

File tree

src/app/dashboard/account/page.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import DashboardPageLayout from '@/features/dashboard/page-layout'
22
import { NameSettings } from '@/features/dashboard/account/name-settings'
33
import { EmailSettings } from '@/features/dashboard/account/email-settings'
44
import { PasswordSettings } from '@/features/dashboard/account/password-settings'
5-
import { DangerZone } from '@/features/dashboard/account/danger-zone'
65
import { Suspense } from 'react'
76
import { AccessTokenSettings } from '@/features/dashboard/account/access-token-settings'
87

@@ -28,10 +27,6 @@ export default async function AccountPage() {
2827
<Suspense fallback={null}>
2928
<PasswordSettings />
3029
</Suspense>
31-
32-
<Suspense fallback={null}>
33-
<DangerZone />
34-
</Suspense>
3530
</DashboardPageLayout>
3631
)
3732
}

src/features/dashboard/account/danger-zone.tsx

Lines changed: 0 additions & 101 deletions
This file was deleted.

src/server/user/user-actions.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,6 @@ export const updateUserAction = authActionClient
8484
}
8585
})
8686

87-
export const deleteAccountAction = authActionClient
88-
.metadata({ actionName: 'deleteAccount' })
89-
.action(async ({ ctx }) => {
90-
const { user } = ctx
91-
92-
const { error } = await supabaseAdmin.auth.admin.deleteUser(user.id)
93-
94-
if (error) {
95-
throw new Error(error.message)
96-
}
97-
})
98-
9987
export const getUserAccessTokenAction = authActionClient
10088
.metadata({ actionName: 'getUserAccessToken' })
10189
.action(async ({ ctx }) => {

0 commit comments

Comments
 (0)