@@ -12,7 +12,6 @@ import {
1212 Tr ,
1313 Text ,
1414 Button ,
15- Heading ,
1615 HStack ,
1716 VStack ,
1817 Textarea ,
@@ -36,6 +35,7 @@ import {
3635 ModalFooter ,
3736 ModalBody ,
3837 ModalCloseButton ,
38+ useDisclosure ,
3939} from '@chakra-ui/react'
4040
4141import {
@@ -70,6 +70,11 @@ export const ManageAccounts = () => {
7070 const [ data , setData ] = useState < Person [ ] > ( [ ] ) ;
7171 const [ view , setView ] = useState < RoleKey > ( "admin" ) ; // "admin" | "cms" | "clients"
7272 const [ open , setOpen ] = useState ( false ) ;
73+ const {
74+ isOpen : isModalOpen ,
75+ onOpen : openModal ,
76+ onClose : closeModal
77+ } = useDisclosure ( ) ;
7378 const [ selectedData , setSelectedData ] = useState < Person > ( {
7479 id : "" ,
7580 firstName : "" ,
@@ -155,6 +160,44 @@ export const ManageAccounts = () => {
155160 }
156161 } ;
157162 return (
163+ < >
164+ < Modal isOpen = { isModalOpen } onClose = { closeModal } >
165+ < ModalOverlay />
166+ < ModalContent >
167+ < ModalHeader > Confirm Changes</ ModalHeader >
168+ < ModalCloseButton />
169+ < ModalBody >
170+ < HStack
171+ width = "100%"
172+ >
173+ < Text
174+ margin = "20px"
175+ mr = "40px"
176+ >
177+ EMAIL
178+ </ Text >
179+ < VStack
180+ width = "100%"
181+ alignItems = "flex-start"
182+ >
183+ < Text >
184+ { data . email }
185+ </ Text >
186+ </ VStack >
187+ </ HStack >
188+ </ ModalBody >
189+ < ModalFooter >
190+ < Flex justifyContent = "space-between" width = "100%" >
191+ < Button onClick = { closeModal } width = "45%" >
192+ Back
193+ </ Button >
194+ < Button colorScheme = "blue" width = "45%" onClick = { ( e ) => { closeModal ( ) ; handleSubmitEmailChange ( e ) } } >
195+ Submit
196+ </ Button >
197+ </ Flex >
198+ </ ModalFooter >
199+ </ ModalContent >
200+ </ Modal >
158201 < Slide
159202 direction = "right"
160203 in = { editEmailDrawerOpened }
@@ -225,9 +268,13 @@ export const ManageAccounts = () => {
225268 </ VStack >
226269
227270 </ VStack >
228- < Button onClick = { handleSubmitEmailChange } > Confirm Changes</ Button >
271+ < Flex width = "100%" justifyContent = "flex-end" >
272+ < Button colorScheme = "blue" onClick = { openModal } > Confirm Changes</ Button >
273+ </ Flex >
274+
229275 </ Box >
230276 </ Slide >
277+ </ >
231278 ) ;
232279 }
233280 const outputDrawerData = ( data : Person , view : string ) => {
@@ -365,9 +412,6 @@ export const ManageAccounts = () => {
365412 </ Button >
366413
367414 </ Flex >
368- < br > </ br >
369- < Text > Notes</ Text >
370- < Textarea size = "md" />
371415 < br > </ br >
372416 < Text > Notes</ Text >
373417 < Textarea size = "md" />
0 commit comments