Skip to content

Commit

Permalink
removed
Browse files Browse the repository at this point in the history
  • Loading branch information
kunal-511 committed Sep 22, 2023
1 parent 1631d89 commit 028a80c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Components/Tempelate2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ const Template2: React.FC = () => {
}
};

// ... rest of your component code

useEffect(() => {
// Load data from local storage when the component mounts
const savedData = localStorage.getItem("formData"); // Use the correct key here

const savedData = localStorage.getItem("formData");
if (savedData) {
setFormData(JSON.parse(savedData));
}
Expand All @@ -78,7 +78,7 @@ const Template2: React.FC = () => {
}, 4000);

return () => clearTimeout(timer);
}, []); // The empty dependency array ensures this effect runs only once on component mount
}, []);

if (showAlternateComponent) {
return (
Expand Down

0 comments on commit 028a80c

Please sign in to comment.