mirror of
https://github.com/luckfox-eng29/kvm.git
synced 2026-04-28 03:33:24 +02:00
29 lines
737 B
TypeScript
29 lines
737 B
TypeScript
import React from "react";
|
|
|
|
import SideTabs from "@components/Sidebar/SideTabs";
|
|
import DeviceFilePage from "@/layout/components_side/SharedFolders/DeviceFilePage";
|
|
import SDFilePage from "@/layout/components_side/SharedFolders/SDFilePage";
|
|
import { useBootStorageType } from "@/hooks/useBootStorage";
|
|
|
|
|
|
const SharedFolders: React.FC = () => {
|
|
const { bootStorageType } = useBootStorageType();
|
|
const isBootFromSD = bootStorageType === "sd";
|
|
|
|
if (isBootFromSD) {
|
|
return <DeviceFilePage />;
|
|
}
|
|
|
|
return (
|
|
<SideTabs
|
|
tab1Label="KVM Storage"
|
|
tab2Label="MicroSD Card"
|
|
tab1Content={<DeviceFilePage />}
|
|
tab2Content={<SDFilePage />}
|
|
defaultActiveKey="1"
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default SharedFolders;
|