import React from "react"; import { Button, Flex, Heading, Spinner, useTheme, useColorMode } from "@chakra-ui/core"; const ErrorMsg = ({ title }) => ( <> {title} ); const ErrorBtn = ({ text, onClick }) => ( ); export default ({ loading, error, refresh }) => { const theme = useTheme(); const { colorMode } = useColorMode(); const bg = { light: theme.colors.white, dark: theme.colors.dark }; const color = { light: theme.colors.dark, dark: theme.colors.white }; return ( {loading && } {!loading && error && ( <> )} ); };