also use currentVersion

This commit is contained in:
Abi Raja 2024-07-25 12:33:31 -04:00
parent 98951e0382
commit 83f6f00b10
2 changed files with 6 additions and 2 deletions

View File

@ -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);

View File

@ -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;
}