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