-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathServerErrorModal.tsx
87 lines (86 loc) · 2.23 KB
/
ServerErrorModal.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import React from "react"
import {
Button,
Flex,
HStack,
Icon,
ModalBody,
ModalCloseButton,
ModalFooter,
ModalHeader,
Text,
} from "@chakra-ui/react"
import { CableWithPlugIcon } from "#/assets/icons"
import { externalHref } from "#/constants"
import IconWrapper from "#/components/shared/IconWrapper"
import {
IconBrandDiscordFilled,
IconReload,
IconServerBolt,
} from "@tabler/icons-react"
import LinkButton from "#/components/shared/LinkButton"
// import TooltipIcon from "#/components/shared/TooltipIcon"
export default function ServerErrorModal({
isLoading,
retry,
}: {
isLoading: boolean
retry: () => void
}) {
return (
<>
<ModalCloseButton />
<ModalHeader color="red.50" textAlign="center">
We're currently facing system issues.
</ModalHeader>
<ModalBody gap={10} pb={6}>
<IconWrapper icon={CableWithPlugIcon} boxSize={32} color="red.50">
<Icon as={IconServerBolt} boxSize={14} strokeWidth={1} />
</IconWrapper>
<Text size="md">
Your deposit didn't go through but no worries, your funds are
safe.
</Text>
<LinkButton
size="lg"
width="100%"
variant="outline"
rightIcon={<Icon as={IconBrandDiscordFilled} boxSize={5} />}
href={externalHref.DISCORD}
isExternal
>
Get help on Discord
</LinkButton>
</ModalBody>
<ModalFooter
py={6}
px={8}
flexDirection="row"
justifyContent="space-between"
bgColor="surface.3"
borderRadius="md"
>
<Flex flexDirection="column">
<HStack>
<Text size="md" fontWeight="bold">
System status
</Text>
{/* TODO: ADD a tooltip */}
{/* <TooltipIcon label="Tooltip text" placement="top" /> */}
</HStack>
<Text size="md" color="red.50">
Partial Outage
</Text>
</Flex>
<Button
isLoading={isLoading}
leftIcon={<Icon as={IconReload} boxSize={5} color="acre.50" />}
variant="outline"
onClick={retry}
>
Refresh
</Button>
</ModalFooter>
</>
)
}