fixed uploadFlow in other places

This commit is contained in:
Lucas Oliveira 2023-11-22 14:25:33 -03:00
commit b7303fa032
2 changed files with 6 additions and 2 deletions

View file

@ -358,7 +358,11 @@ export default function Page({
} else if (event.dataTransfer.types.some((types) => types === "Files")) {
takeSnapshot();
if (event.dataTransfer.files.item(0)!.type === "application/json") {
uploadFlow(false, event.dataTransfer.files.item(0)!);
uploadFlow({
newProject: false,
isComponent: false,
file: event.dataTransfer.files.item(0)!,
});
} else {
setErrorData({
title: "Invalid file type",

View file

@ -212,7 +212,7 @@ export default function ExtraSidebar(): JSX.Element {
<button
className="extra-side-bar-buttons"
onClick={() => {
uploadFlow(false);
uploadFlow({ newProject: false, isComponent: false });
}}
>
<IconComponent name="FileUp" className="side-bar-button-size " />