diff --git a/src/components/registration/topicSelection/TopicSelection.tsx b/src/components/registration/topicSelection/TopicSelection.tsx index 416e09e51..9837d0f7b 100644 --- a/src/components/registration/topicSelection/TopicSelection.tsx +++ b/src/components/registration/topicSelection/TopicSelection.tsx @@ -45,16 +45,14 @@ export const TopicSelection: VFC<{ const [topics, setTopics] = useState([]); const [isLoading, setIsLoading] = useState(false); const [listView, setListView] = useState(false); - const [topicGroupId, setTopicGroupId] = useState(0); + const [topicGroupId, setTopicGroupId] = useState( + sessionStorageRegistrationData.topicGroupId || undefined + ); const getTopic = (mainTopicId: number) => { return topics?.filter((topic) => topic?.id === mainTopicId)?.[0]; }; - const getTopicInteraction = (topicGroupId: number) => { - setTopicGroupId(topicGroupId); - }; - useEffect(() => { if ( REGISTRATION_DATA_VALIDATION.mainTopicId.validation( @@ -260,9 +258,11 @@ export const TopicSelection: VFC<{ )) : topicGroups.map((topicGroup) => ( )} @@ -421,7 +428,7 @@ export const TopicSelection: VFC<{ ))} - ))} + ))} )} diff --git a/src/globalState/provider/RegistrationProvider.tsx b/src/globalState/provider/RegistrationProvider.tsx index 3b0067156..a3f8cbbfc 100644 --- a/src/globalState/provider/RegistrationProvider.tsx +++ b/src/globalState/provider/RegistrationProvider.tsx @@ -52,6 +52,7 @@ interface RegistrationSessionStorageData { password: string; agencyId: number; mainTopicId: number; + topicGroupId?: number; topicId?: number; zipcode: string; }