-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
simplified interface; new message modal; performance tweaks; better a…
…ccount handling
- Loading branch information
Showing
22 changed files
with
511 additions
and
535 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
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
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
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,48 @@ | ||
import { | ||
useDisclosure, | ||
Modal, | ||
ModalOverlay, | ||
ModalContent, | ||
ModalHeader, | ||
ModalCloseButton, | ||
ModalBody, | ||
ModalFooter, | ||
Button, | ||
} from "@chakra-ui/react"; | ||
import { CreateEventForm } from "./create-event-form"; | ||
|
||
interface EventFormModalProps { | ||
buttonSize: string; | ||
} | ||
|
||
export function EventFormModal(props?: EventFormModalProps) { | ||
const { isOpen, onOpen, onClose } = useDisclosure(); | ||
|
||
const sendCallback = () => { | ||
onClose(); | ||
}; | ||
|
||
return ( | ||
<> | ||
<Button size={props?.buttonSize || "md"} onClick={onOpen}> | ||
Post message | ||
</Button> | ||
<Modal isOpen={isOpen} onClose={onClose}> | ||
<ModalOverlay /> | ||
<ModalContent> | ||
<ModalHeader>Broadcast to the Network</ModalHeader> | ||
<ModalCloseButton /> | ||
<ModalBody> | ||
<CreateEventForm sendCallback={sendCallback} /> | ||
</ModalBody> | ||
|
||
<ModalFooter> | ||
<Button colorScheme="blue" mr={3} onClick={onClose}> | ||
Close | ||
</Button> | ||
</ModalFooter> | ||
</ModalContent> | ||
</Modal> | ||
</> | ||
); | ||
} |
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
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
Oops, something went wrong.