fixed uploadFlow in other places
This commit is contained in:
parent
b633afba8d
commit
b7303fa032
2 changed files with 6 additions and 2 deletions
|
|
@ -358,7 +358,11 @@ export default function Page({
|
||||||
} else if (event.dataTransfer.types.some((types) => types === "Files")) {
|
} else if (event.dataTransfer.types.some((types) => types === "Files")) {
|
||||||
takeSnapshot();
|
takeSnapshot();
|
||||||
if (event.dataTransfer.files.item(0)!.type === "application/json") {
|
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 {
|
} else {
|
||||||
setErrorData({
|
setErrorData({
|
||||||
title: "Invalid file type",
|
title: "Invalid file type",
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ export default function ExtraSidebar(): JSX.Element {
|
||||||
<button
|
<button
|
||||||
className="extra-side-bar-buttons"
|
className="extra-side-bar-buttons"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
uploadFlow(false);
|
uploadFlow({ newProject: false, isComponent: false });
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<IconComponent name="FileUp" className="side-bar-button-size " />
|
<IconComponent name="FileUp" className="side-bar-button-size " />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue