Skip to content

Commit

Permalink
feat(front): Switch to objects tab when a shape is created (pixano#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
timothee-LJN authored Feb 1, 2024
1 parent 0cbf1aa commit af7e8ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

<div class="h-full max-h-screen shadow-sm border-l border-slate-200 bg-slate-100">
{#if shape?.status === "inProgress"}
<SaveShapeForm />
<SaveShapeForm bind:currentTab />
{:else}
<Tabs.Root bind:value={currentTab} class="h-full">
<Tabs.List class="h-[48px]">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import { mapShapeInputsToFeatures } from "../../lib/api/featuresApi";
import FeatureFormInputs from "../Features/FeatureFormInputs.svelte";
export let currentTab: "scene" | "objects";
let shape: Shape;
let isFormValid: boolean = false;
let formInputs: CreateObjectInputs = [];
Expand Down Expand Up @@ -84,6 +85,7 @@
});
newShape.set({ status: "none" });
canSave.set(true);
currentTab = "objects";
};
</script>

Expand Down

0 comments on commit af7e8ab

Please sign in to comment.