-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unify and slightly reword account deletion
The `DeletionCard` was duplicated across the `Profile` for self hosted users, as well as the `Admin` for SaaS. This now uses the same component for both, and slightly rewords the text.
- Loading branch information
Showing
9 changed files
with
39 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 0 additions & 45 deletions
45
src/pages/AccountSettings/tabs/Admin/DeletionCard/DeletionCard.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/pages/AccountSettings/tabs/DeletionCard/DeletionCard.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import Card from 'old_ui/Card' | ||
import A from 'ui/A' | ||
|
||
interface DeletionCardProps { | ||
isPersonalSettings: boolean | ||
} | ||
|
||
function DeletionCard({ isPersonalSettings }: DeletionCardProps) { | ||
return ( | ||
<div className="flex flex-col gap-4"> | ||
<h2 className="text-lg font-semibold"> | ||
{isPersonalSettings ? 'Delete account' : 'Delete organization'} | ||
</h2> | ||
<Card> | ||
<p> | ||
{isPersonalSettings | ||
? 'Erase my personal account and all my repositories. ' | ||
: 'Erase organization and all its repositories. '} | ||
<A | ||
to={{ pageName: 'support' }} | ||
hook="contact-support-link" | ||
isExternal | ||
> | ||
Contact support | ||
</A> | ||
</p> | ||
</Card> | ||
</div> | ||
) | ||
} | ||
|
||
export default DeletionCard |
File renamed without changes.
28 changes: 0 additions & 28 deletions
28
src/pages/AccountSettings/tabs/Profile/DeletionCard/DeletionCard.test.tsx
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
src/pages/AccountSettings/tabs/Profile/DeletionCard/DeletionCard.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters