Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue-28 #255

Merged
merged 4 commits into from
Oct 27, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion pos/app/routes/_header.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
import { Outlet } from "@remix-run/react";
import { OnlineStatus } from "~/components/online-status";
import { OnlineStatus, useOnlineStatus } from "~/components/online-status";

export default function BaseHeader() {
const isOnline = useOnlineStatus();

if (!isOnline) {
return (
<div className="flex items-center justify-center h-screen bg-gray-100">
<div className="text-center">
<h1 className="text-4xl font-bold mb-4">⛔オフライン</h1>
toririm marked this conversation as resolved.
Show resolved Hide resolved
<p className="text-xl">
インターネット接続が切断されています。
<br />
接続が回復するまでお待ちください。
</p>
</div>
</div>
);
}
return (
<div>
{/* TODO(toririm): デザインが微妙にダサいので何とかする。
Expand Down