Remove project download functionality from ProjectManager

This commit is contained in:
2026-07-13 22:05:10 +02:00
parent 3d8e26ec0f
commit 3b3c4d1cb9

View File

@@ -14,23 +14,12 @@ import ExportProject from './Export/ExportProject';
function ProjectManager() { function ProjectManager() {
const [projectId, setProjectId] = useAtom(projectIdAtom); const [projectId, setProjectId] = useAtom(projectIdAtom);
const { data, refetch } = useProject(projectId); const { refetch } = useProject(projectId);
const { resetSceneNames } = useSceneName(projectId); const { resetSceneNames } = useSceneName(projectId);
const { hasCustomNames } = useCustomSceneNames(projectId); const { hasCustomNames } = useCustomSceneNames(projectId);
const appState = useAppState(); const appState = useAppState();
const projects = useProjectsList(); const projects = useProjectsList();
const downloadProjectFile = async () => {
if (!data?.projectFile) {
return;
}
await fetch('http://127.0.0.1:5174/project-05.tar', {
method: 'POST',
body: data.projectFile,
});
};
return ( return (
<div className="flex gap-2 items-center"> <div className="flex gap-2 items-center">
<Select <Select
@@ -59,15 +48,6 @@ function ProjectManager() {
> >
<IconReload className="w-4 h-4" /> <IconReload className="w-4 h-4" />
</Button> </Button>
<Button
onClick={downloadProjectFile}
disabled={!data?.projectFile}
size="sm"
variant="secondary"
title="Download raw project file"
>
Download raw
</Button>
{hasCustomNames && ( {hasCustomNames && (
<Button <Button
onClick={resetSceneNames} onClick={resetSceneNames}