We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e697f21 commit e5af1a3Copy full SHA for e5af1a3
src/components/Stat/index.tsx
@@ -1,4 +1,4 @@
1
-import * as React from "react"
+import { useEffect, useState } from "react"
2
import type { IconType } from "react-icons/lib"
3
import { MdInfoOutline, MdWarning } from "react-icons/md"
4
import { Flex, HStack, Icon, Text } from "@chakra-ui/react"
@@ -20,12 +20,12 @@ export type StatProps = {
20
}
21
22
const Stat = ({ tooltipProps, value, label, isError }: StatProps) => {
23
- const [content, setContent] = React.useState<{
+ const [content, setContent] = useState<{
24
contentValue: string | JSX.Element
25
tooltipIcon: IconType
26
}>(initialContent)
27
28
- React.useEffect(() => {
+ useEffect(() => {
29
if (isError) {
30
return setContent({
31
contentValue: NULL_VALUE,
0 commit comments