(value: T, delayMs: number): T {
return debounced;
}
+
+/**
+ * Get the current time and keep it updated by the specified interval.
+ */
+export function useTime(updateInterval: Duration): DateTime {
+ const [time, setTime] = useState(DateTime.now());
+
+ return time;
+}
diff --git a/src/scenes/kit/index.tsx b/src/scenes/kit/index.tsx
index 7447451..96847d0 100644
--- a/src/scenes/kit/index.tsx
+++ b/src/scenes/kit/index.tsx
@@ -41,6 +41,7 @@ import style from "./index.module.css";
import { rtkApi } from "~/services/astroplant";
import { skipToken } from "@reduxjs/toolkit/query";
import { selectMe } from "~/modules/me/reducer";
+import { KitActiveBadge } from "~/Components/KitActiveBadge";
type Params = { kitSerial: string };
@@ -62,6 +63,7 @@ function KitHeader({
{kit.name || "Unnamed kit"} / {kit.serial}
+
{kit.privacyPublicDashboard && (
)}
diff --git a/src/scenes/user/index.tsx b/src/scenes/user/index.tsx
index dcfbc90..c0dfd6f 100644
--- a/src/scenes/user/index.tsx
+++ b/src/scenes/user/index.tsx
@@ -16,6 +16,7 @@ import { Badge } from "~/Components/Badge";
import commonStyle from "~/Common.module.css";
import style from "./index.module.css";
+import { KitActiveBadge } from "~/Components/KitActiveBadge";
export default function User({ username }: { username: string }) {
// This component is used to render both the user profile of the logged-in
@@ -160,6 +161,7 @@ export default function User({ username }: { username: string }) {
{kit.name}
+
{kit.privacyPublicDashboard && (