We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 08f6ffa commit 0c4cdeaCopy full SHA for 0c4cdea
src/components/common/OfflineNotice.tsx
@@ -0,0 +1,13 @@
1
+import React from 'react';
2
+import { FaWifi } from 'react-icons/fa';
3
+import { useOnlineStatus } from '../../hooks/useOnlineStatus';
4
+const OfflineNotice: React.FC = () => {
5
+ const isOnline = useOnlineStatus();
6
+ if (isOnline) return null;
7
+ return (
8
+ <div className='fixed top-0 left-0 right-0 z-[200] bg-red-500 text-white text-center py-2 text-sm font-medium flex items-center justify-center gap-2'>
9
+ <FaWifi /><span>You are offline. Some features may not work.</span>
10
+ </div>
11
+ );
12
+};
13
+export default OfflineNotice;
0 commit comments