@@ -40,9 +50,9 @@ export const Dashboard = () => {
-
- {devices.length
- ? (
+ {devices.length > 0
+ ? (
+
{devices.map((device) => {
return (
@@ -104,33 +114,31 @@ export const Dashboard = () => {
);
})}
- )
- : (
-
-
+
+
+
+
+ )
+ : (
+
+
{t("dashboard.noDevicesTitle")}
- {/*
*/}
{t("dashboard.noDevicesDescription")}
-
- )}
-
+
+
+ )}
>
);
diff --git a/src/pages/Messages.tsx b/src/pages/Messages.tsx
index 95d167b9..7e58d9ab 100644
--- a/src/pages/Messages.tsx
+++ b/src/pages/Messages.tsx
@@ -140,7 +140,7 @@ export const MessagesPage = () => {
} else {
console.warn("sendText completed but messageId is undefined");
}
- } catch (e: any) {
+ } catch (e: unknown) {
console.error("Failed to send message:", e);
const failedId = messageId ?? randId();
if (chatType === MessageType.Broadcast) {
diff --git a/src/routes.tsx b/src/routes.tsx
index f936fd12..2683301a 100644
--- a/src/routes.tsx
+++ b/src/routes.tsx
@@ -1,4 +1,4 @@
-import { createRoute, redirect } from "@tanstack/react-router";
+import { createRoute } from "@tanstack/react-router";
import { Dashboard } from "@pages/Dashboard/index.tsx";
import MessagesPage from "@pages/Messages.tsx";
import MapPage from "@pages/Map/index.tsx";
@@ -17,10 +17,6 @@ const indexRoute = createRoute({
getParentRoute: () => rootRoute,
path: "/",
component: Dashboard,
- loader: () => {
- // Redirect to the broadcast messages page on initial load
- return redirect({ to: `/messages/broadcast/0`, replace: true });
- },
});
const messagesRoute = createRoute({
diff --git a/vite.config.ts b/vite.config.ts
index 05daf0e3..83bba01f 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -32,9 +32,9 @@ export default defineConfig({
targets: [
{
src: "src/i18n/locales/**/*",
- dest: "src/i18n/locales"
- }
- ]
+ dest: "src/i18n/locales",
+ },
+ ],
}),
],
define: {