-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb33cb5
commit 1e246b9
Showing
3 changed files
with
134 additions
and
15 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
75 changes: 75 additions & 0 deletions
75
audire/audire-mobile-app/src/modules/profile/ConfirmDeleteAccountDialog.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,75 @@ | ||
import React, { ComponentProps, FC } from 'react'; | ||
import { Linking } from 'react-native'; | ||
import { | ||
Heading, | ||
Modal, | ||
ModalBackdrop, | ||
ModalContent, | ||
ModalHeader, | ||
ModalCloseButton, | ||
ModalBody, | ||
Text, | ||
ModalFooter, | ||
ButtonText, | ||
Button, | ||
} from '@gluestack-ui/themed'; | ||
|
||
type ConfirmDeleteAccountDialogProps = ComponentProps<typeof Modal> & { | ||
isOpen: boolean; | ||
onClose: () => void; | ||
}; | ||
|
||
const ConfirmDeleteAccountDialog: FC<ConfirmDeleteAccountDialogProps> = ( | ||
props | ||
) => { | ||
const ref = React.useRef(null); | ||
|
||
const handleDeleteAccount = () => { | ||
// Open the link in the browser | ||
Linking.openURL('https://audirelearning.com/contact-us'); | ||
}; | ||
|
||
return ( | ||
<Modal isOpen={props.isOpen} onClose={props.onClose} finalFocusRef={ref}> | ||
<ModalBackdrop /> | ||
<ModalContent> | ||
<ModalHeader> | ||
<Heading size="lg" color="$red"> | ||
Delete your Account? | ||
</Heading> | ||
<ModalCloseButton /> | ||
</ModalHeader> | ||
<ModalBody> | ||
<Text>Are you sure want to Delete your Account?</Text> | ||
</ModalBody> | ||
<ModalFooter> | ||
<Button | ||
variant="outline" | ||
size="sm" | ||
action="secondary" | ||
mr="$3" | ||
onPress={() => { | ||
props.onClose(); | ||
}} | ||
> | ||
<ButtonText>Cancel</ButtonText> | ||
</Button> | ||
<Button | ||
size="sm" | ||
action="negative" | ||
borderWidth="$0" | ||
onPress={() => { | ||
props.onClose(); | ||
|
||
handleDeleteAccount(); | ||
}} | ||
> | ||
<ButtonText>Delete Account</ButtonText> | ||
</Button> | ||
</ModalFooter> | ||
</ModalContent> | ||
</Modal> | ||
); | ||
}; | ||
|
||
export default ConfirmDeleteAccountDialog; |
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
1e246b9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
audire-landing – ./
audire-landing-git-master-audire-learnings-projects.vercel.app
audire-landing.vercel.app
audire-landing-audire-learnings-projects.vercel.app
audirelearning.com
www.audirelearning.com