Add maps, Bluetooth config & fixes
This commit is contained in:
@@ -2,7 +2,7 @@ import type React from "react";
|
||||
|
||||
import { Pane } from "evergreen-ui";
|
||||
|
||||
import { useDevice } from "@app/core/stores/deviceStore.js";
|
||||
import { useDevice } from "@core/providers/useDevice.js";
|
||||
|
||||
export const Environment = (): JSX.Element => {
|
||||
const { nodes } = useDevice();
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import type React from "react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import { Pane } from "evergreen-ui";
|
||||
import useSWR from "swr";
|
||||
|
||||
import { fetcher } from "@core/utils/fetcher";
|
||||
|
||||
export interface File {
|
||||
nameModified: string;
|
||||
@@ -24,10 +22,15 @@ export interface Files {
|
||||
}
|
||||
|
||||
export const FileBrowser = (): JSX.Element => {
|
||||
const { data } = useSWR<Files>(
|
||||
"http://meshtastic.local/json/fs/browse/static",
|
||||
fetcher
|
||||
);
|
||||
const [data, setData] = useState<Files>();
|
||||
|
||||
useEffect(() => {
|
||||
void fetch("http://meshtastic.local/json/fs/browse/static").then(
|
||||
async (res) => {
|
||||
setData((await res.json()) as Files);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
return (
|
||||
<Pane>
|
||||
|
||||
@@ -2,8 +2,8 @@ import type React from "react";
|
||||
|
||||
import { DocumentIcon, GanttChartIcon, RainIcon } from "evergreen-ui";
|
||||
|
||||
import { useDevice } from "@app/core/stores/deviceStore.js";
|
||||
import { TabbedContent, TabType } from "@components/layout/page/TabbedContent";
|
||||
import { useDevice } from "@core/providers/useDevice.js";
|
||||
import { FileBrowser } from "@pages/Extensions/FileBrowser";
|
||||
|
||||
import { Environment } from "./Environment.js";
|
||||
|
||||
Reference in New Issue
Block a user