import { HStack, Text, VStack } from '@chakra-ui/react'; import React from 'react'; import { TbWifiOff } from 'react-icons/tb'; import { useNavigate } from 'react-router-dom'; import { PrimaryBtn } from './Buttons'; const ErrorMessage = ({ offline, urlNotFound }) => { const reload = () => window.location.reload(); const navigate = useNavigate(); return ( {offline && ( No internet connection ! Try again )} {urlNotFound && ( This page doesn’t exist 😟 ! Please check your URL or{' '} navigate('/')} > go back home )} ); }; export default ErrorMessage;