refactor
This commit is contained in:
parent
96658819f3
commit
64dd7d6279
@ -56,8 +56,9 @@ export const useProjectStore = create<ProjectStore>((set) => ({
|
|||||||
typeof updater === "function" ? updater(state.generatedCode) : updater,
|
typeof updater === "function" ? updater(state.generatedCode) : updater,
|
||||||
})),
|
})),
|
||||||
|
|
||||||
variants: [],
|
|
||||||
currentVariantIndex: 0,
|
currentVariantIndex: 0,
|
||||||
|
variants: [],
|
||||||
|
executionConsoles: {},
|
||||||
|
|
||||||
setCurrentVariantIndex: (index) => set({ currentVariantIndex: index }),
|
setCurrentVariantIndex: (index) => set({ currentVariantIndex: index }),
|
||||||
setVariant: (code: string, index: number) =>
|
setVariant: (code: string, index: number) =>
|
||||||
@ -80,8 +81,6 @@ export const useProjectStore = create<ProjectStore>((set) => ({
|
|||||||
}),
|
}),
|
||||||
resetVariants: () => set({ variants: [], currentVariantIndex: 0 }),
|
resetVariants: () => set({ variants: [], currentVariantIndex: 0 }),
|
||||||
|
|
||||||
executionConsoles: {},
|
|
||||||
|
|
||||||
appendExecutionConsole: (variantIndex: number, line: string) =>
|
appendExecutionConsole: (variantIndex: number, line: string) =>
|
||||||
set((state) => ({
|
set((state) => ({
|
||||||
executionConsoles: {
|
executionConsoles: {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user