reorganize code into smaller files & dirs
This commit is contained in:
20
packages/app/src/Components/Offline.tsx
Normal file
20
packages/app/src/Components/Offline.tsx
Normal file
@ -0,0 +1,20 @@
|
||||
import Icon from "@/Components/Icons/Icon";
|
||||
import AsyncButton from "./Button/AsyncButton";
|
||||
import { FormattedMessage } from "react-intl";
|
||||
import classNames from "classnames";
|
||||
|
||||
export function Offline({ onRetry, className }: { onRetry?: () => void | Promise<void>; className?: string }) {
|
||||
return (
|
||||
<div className={classNames("flex items-center g8", className)}>
|
||||
<Icon name="wifi-off" className="error" />
|
||||
<div className="error">
|
||||
<FormattedMessage defaultMessage="Offline" id="7UOvbT" />
|
||||
</div>
|
||||
{onRetry && (
|
||||
<AsyncButton onClick={onRetry}>
|
||||
<FormattedMessage defaultMessage="Retry" id="62nsdy" />
|
||||
</AsyncButton>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user