-
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.
Merge pull request #67 from jcari-dev/66-rendering-board-bug
added bug notifier
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import React, { useEffect } from "react"; | ||
import { | ||
Modal, | ||
ModalOverlay, | ||
ModalContent, | ||
ModalHeader, | ||
ModalCloseButton, | ||
ModalBody, | ||
ModalFooter, | ||
Text, | ||
useDisclosure, | ||
Button, | ||
} from "@chakra-ui/react"; | ||
|
||
function BugNotifier() { | ||
const OverlayOne = () => ( | ||
<ModalOverlay | ||
bg="none" | ||
backdropFilter="auto" | ||
backdropInvert="80%" | ||
backdropBlur="2px" | ||
/> | ||
); | ||
|
||
const { isOpen, onOpen, onClose } = useDisclosure(); | ||
|
||
useEffect(() => { | ||
const checkServerResponse = () => { | ||
onOpen(); | ||
}; | ||
|
||
|
||
checkServerResponse(); | ||
}, [onOpen]); | ||
|
||
return ( | ||
<> | ||
<Modal isCentered isOpen={isOpen} onClose={onClose}> | ||
<OverlayOne /> | ||
<ModalContent> | ||
<ModalHeader>Uh Oh!</ModalHeader> | ||
<ModalCloseButton /> | ||
<ModalBody> | ||
<Text mb={4}> | ||
Please note, there is a known rendering issue in CPU matches that | ||
may prevent you from completing the game (but feel free to give it | ||
a try!). | ||
</Text> | ||
|
||
<Text mb={4}> | ||
This bug does not affect player vs player mode and is currently | ||
being addressed! | ||
</Text> | ||
</ModalBody> | ||
<ModalFooter> | ||
<Button colorScheme="blue" mr={3} onClick={onClose}> | ||
Got it, thanks for the heads up! | ||
</Button> | ||
</ModalFooter> | ||
</ModalContent> | ||
</Modal> | ||
</> | ||
); | ||
} | ||
|
||
export default BugNotifier; |
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