also use currentVersion
This commit is contained in:
parent
98951e0382
commit
83f6f00b10
@ -56,6 +56,8 @@ function App() {
|
|||||||
setReferenceImages,
|
setReferenceImages,
|
||||||
generatedCode,
|
generatedCode,
|
||||||
setGeneratedCode,
|
setGeneratedCode,
|
||||||
|
currentVersion,
|
||||||
|
setCurrentVersion,
|
||||||
} = useProjectStore();
|
} = useProjectStore();
|
||||||
|
|
||||||
const [executionConsole, setExecutionConsole] = useState<string[]>([]);
|
const [executionConsole, setExecutionConsole] = useState<string[]>([]);
|
||||||
@ -88,8 +90,6 @@ function App() {
|
|||||||
|
|
||||||
// App history
|
// App history
|
||||||
const [appHistory, setAppHistory] = useState<History>([]);
|
const [appHistory, setAppHistory] = useState<History>([]);
|
||||||
// Tracks the currently shown version from app history
|
|
||||||
const [currentVersion, setCurrentVersion] = useState<number | null>(null);
|
|
||||||
|
|
||||||
const [shouldIncludeResultImage, setShouldIncludeResultImage] =
|
const [shouldIncludeResultImage, setShouldIncludeResultImage] =
|
||||||
useState<boolean>(false);
|
useState<boolean>(false);
|
||||||
|
|||||||
@ -16,8 +16,12 @@ interface ProjectStore {
|
|||||||
setGeneratedCode: (
|
setGeneratedCode: (
|
||||||
updater: string | ((currentCode: string) => string)
|
updater: string | ((currentCode: string) => string)
|
||||||
) => void;
|
) => void;
|
||||||
|
|
||||||
|
// Tracks the currently shown version from app history
|
||||||
|
// TODO: might want to move to appStore
|
||||||
currentVersion: number | null;
|
currentVersion: number | null;
|
||||||
setCurrentVersion: (version: number | null) => void;
|
setCurrentVersion: (version: number | null) => void;
|
||||||
|
|
||||||
appHistory: History[];
|
appHistory: History[];
|
||||||
setAppHistory: (history: History[]) => void;
|
setAppHistory: (history: History[]) => void;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user