fix build
This commit is contained in:
@@ -36,10 +36,7 @@ export const FileBrowser = (): JSX.Element => {
|
||||
<a
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
href={`http://meshtastic.local/json/fs/browse/static/${file.name.replace(
|
||||
"static/",
|
||||
""
|
||||
)}`}
|
||||
href={`http://meshtastic.local/${file.name.replace("static/", "")}`}
|
||||
>
|
||||
{file.name.replace("static/", "").replace(".gz", "")}
|
||||
</a>
|
||||
|
||||
@@ -1,46 +1,35 @@
|
||||
import type React from "react";
|
||||
import { useState } from "react";
|
||||
|
||||
import { DocumentIcon, GanttChartIcon, RainIcon } from "evergreen-ui";
|
||||
|
||||
import { useDevice } from "@app/core/stores/deviceStore.js";
|
||||
import { Tab, TabbedContent } from "@components/layout/page/TabbedContent";
|
||||
import { TabbedContent, TabType } from "@components/layout/page/TabbedContent";
|
||||
import { FileBrowser } from "@pages/Extensions/FileBrowser";
|
||||
|
||||
import { Environment } from "./Environment.js";
|
||||
|
||||
export const ExtensionsPage = (): JSX.Element => {
|
||||
const [activeExtension, setActiveExtension] = useState(0);
|
||||
const { hardware } = useDevice();
|
||||
|
||||
const tabs: Tab[] = [
|
||||
const tabs: TabType[] = [
|
||||
{
|
||||
key: 0,
|
||||
name: "File Browser",
|
||||
icon: DocumentIcon,
|
||||
element: FileBrowser,
|
||||
disabled: !hardware.hasWifi,
|
||||
},
|
||||
{
|
||||
key: 1,
|
||||
name: "Range Test",
|
||||
icon: GanttChartIcon,
|
||||
element: FileBrowser,
|
||||
disabled: !hardware.hasWifi,
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
name: "Environment",
|
||||
icon: RainIcon,
|
||||
element: Environment,
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<TabbedContent
|
||||
active={activeExtension}
|
||||
setActive={setActiveExtension}
|
||||
tabs={tabs}
|
||||
/>
|
||||
);
|
||||
return <TabbedContent tabs={tabs} />;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user