refactor settings
This commit is contained in:
parent
e9bfc9e554
commit
457d895042
3 changed files with 27 additions and 12 deletions
|
|
@ -5,10 +5,13 @@ import Survey from "../Survey/Survey.tsx";
|
|||
import SettingSurvey from "../SettingSurvey/SettingSurvey.tsx";
|
||||
|
||||
const MainComponent: React.FC = () => {
|
||||
const [activePage, setActivePage] = useState('Вопросы');
|
||||
const [activePage, setActivePage] = useState(
|
||||
localStorage.getItem("activePage") || "Вопросы"
|
||||
);
|
||||
|
||||
const handleNavigationClick = (title: string) => {
|
||||
setActivePage(title);
|
||||
localStorage.setItem('activePage', title);
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue