Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
1import { Button, H3 } from "@/components/Shared/UI";
2import clearLocalStorage from "@/helpers/clearLocalStorage";
3
4interface SiteErrorProps {
5 message?: string;
6}
7
8const SiteError = ({ message }: SiteErrorProps) => {
9 const clearLocalData = () => {
10 clearLocalStorage();
11 setTimeout(() => location.reload(), 200);
12 };
13
14 return (
15 <div className="p-10 text-center">
16 <H3 className="mb-4">Looks like something went wrong!</H3>
17 <div className="mb-4 text-gray-500 dark:text-gray-200">
18 We track these errors automatically, but if the problem persists feel
19 free to contact us. In the meantime, try refreshing.
20 </div>
21 {message && (
22 <div className="mx-auto my-10 w-fit max-w-md rounded-lg bg-black p-3 font-mono text-white text-xs">
23 {message}
24 </div>
25 )}
26 <Button
27 className="mx-auto flex items-center"
28 onClick={() => clearLocalData()}
29 >
30 Clear cache and refresh
31 </Button>
32 </div>
33 );
34};
35
36export default SiteError;