From 602c2af64f663203a2e3c14139a616ec581e05e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=82=E3=81=AB=E3=82=87=E3=81=A3=E3=81=A8=E3=81=97?= =?UTF-8?q?=E3=81=9F=E3=81=B7=E3=81=AB=E3=81=B7=E3=81=AB=E3=81=AE=E3=81=AA?= =?UTF-8?q?=E3=81=AB=E3=81=8B?= <134484570+monyopuni@users.noreply.github.com> Date: Tue, 8 Oct 2024 05:05:01 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=E3=82=AA=E3=83=95=E3=83=A9=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=81=AE=E6=99=82=E3=81=ABOutlet=E3=81=8C=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84=E3=82=88=E3=81=86?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pos/app/routes/_header.tsx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/pos/app/routes/_header.tsx b/pos/app/routes/_header.tsx index 2b945fd7..1076db27 100644 --- a/pos/app/routes/_header.tsx +++ b/pos/app/routes/_header.tsx @@ -1,7 +1,24 @@ 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 ( +
+
+

⛔オフライン

+

+ インターネット接続が切断されています。 +
+ 接続が回復するまでお待ちください。 +

+
+
+ ); + } + return (
{/* TODO(toririm): デザインが微妙にダサいので何とかする。 From 8bfbdf5aca8666f919c84acf39715dd09c2c7e8b Mon Sep 17 00:00:00 2001 From: takum1 Date: Tue, 8 Oct 2024 05:10:24 +0900 Subject: [PATCH 2/4] Update pos/app/routes/_header.tsx Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- pos/app/routes/_header.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/pos/app/routes/_header.tsx b/pos/app/routes/_header.tsx index 1076db27..178864a5 100644 --- a/pos/app/routes/_header.tsx +++ b/pos/app/routes/_header.tsx @@ -18,7 +18,6 @@ export default function BaseHeader() {
); } - return (
{/* TODO(toririm): デザインが微妙にダサいので何とかする。 From 00090806957f52d6c7cabf0c5d798f69b40ab74b Mon Sep 17 00:00:00 2001 From: takum1 Date: Tue, 8 Oct 2024 05:10:30 +0900 Subject: [PATCH 3/4] Update pos/app/routes/_header.tsx Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- pos/app/routes/_header.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pos/app/routes/_header.tsx b/pos/app/routes/_header.tsx index 178864a5..a6f616fb 100644 --- a/pos/app/routes/_header.tsx +++ b/pos/app/routes/_header.tsx @@ -1,5 +1,5 @@ import { Outlet } from "@remix-run/react"; -import { OnlineStatus,useOnlineStatus } from "~/components/online-status"; +import { OnlineStatus, useOnlineStatus } from "~/components/online-status"; export default function BaseHeader() { const isOnline = useOnlineStatus(); From 62d43883ba4463222ffd6e3a6c4cd8e0264295fc Mon Sep 17 00:00:00 2001 From: toririm Date: Tue, 22 Oct 2024 03:10:10 +0900 Subject: [PATCH 4/4] fmt --- pos/app/routes/_header.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pos/app/routes/_header.tsx b/pos/app/routes/_header.tsx index a6f616fb..f8c90436 100644 --- a/pos/app/routes/_header.tsx +++ b/pos/app/routes/_header.tsx @@ -6,9 +6,9 @@ export default function BaseHeader() { if (!isOnline) { return ( -
+
-

⛔オフライン

+

⛔オフライン

インターネット接続が切断されています。