mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Re-use local storage prompt on index until project has been created.
This commit is contained in:
1 parent
1dc0cf4529
commit
d3e5402dbe
1 file changed
+6
-1
+6
-1
@@ -64,7 +64,12 @@ export default function Index() {
|
||||
loadProjects();
|
||||
}, [loadProjects]);
|
||||
|
||||
|
||||
// Restore prompt from local storage on mount
|
||||
useEffect(() => {
|
||||
if (storedPrompt) {
|
||||
setPrompt(storedPrompt);
|
||||
}
|
||||
}, [storedPrompt]);
|
||||
|
||||
// Sync prompt with local storage
|
||||
const handlePromptChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
|
||||
|
||||
Reference in new issue
Block a user