feat(nodeToolbarComponent): add "Share" option to node toolbar menu for future implementation of sharing functionality

fix(nodeToolbarComponent): remove unnecessary comment and code duplication in the "Download" case of the switch statement
This commit is contained in:
anovazzi1 2023-10-04 15:48:38 -03:00
commit 8ac9a70c68

View file

@ -73,6 +73,9 @@ export default function NodeToolbarComponent({
//TODO add logic to save node on backend and update toolbar
downloadNode(createFlowComponent(data));
break;
case "Share":
//TODO add logic to save node on backend and update toolbar
break;
case "SaveAll":
if (isAuthenticated) {
saveComponent(data, autoLogin ? "auto" : userData?.id!);
@ -187,6 +190,15 @@ export default function NodeToolbarComponent({
Save{" "}
</div>{" "}
</SelectItem>
<SelectItem value={"Share"}>
<div className="flex">
<IconComponent
name="Share2"
className="relative top-0.5 mr-2 h-4 w-4"
/>{" "}
Share{" "}
</div>{" "}
</SelectItem>
<SelectItem value={"Download"}>
<div className="flex">
<IconComponent