mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 01:45:53 +08:00
fix: redirect users to previous page after clicking back on onboarding flow instead of services page (#5685)
Co-authored-by: Vikrant Gupta <vikrant.thomso@gmail.com>
This commit is contained in:
parent
8468cc863e
commit
3200fd054e
@ -247,8 +247,7 @@ export default function Onboarding(): JSX.Element {
|
||||
|
||||
const handleNext = (): void => {
|
||||
if (activeStep <= 3) {
|
||||
handleNextStep();
|
||||
history.replace(moduleRouteMap[selectedModule.id as ModulesMap]);
|
||||
history.push(moduleRouteMap[selectedModule.id as ModulesMap]);
|
||||
}
|
||||
};
|
||||
|
||||
@ -258,6 +257,13 @@ export default function Onboarding(): JSX.Element {
|
||||
updateSelectedDataSource(null);
|
||||
};
|
||||
|
||||
const handleBackNavigation = (): void => {
|
||||
setCurrent(0);
|
||||
setActiveStep(1);
|
||||
setSelectedModule(useCases.APM);
|
||||
resetProgress();
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const { pathname } = location;
|
||||
|
||||
@ -277,9 +283,11 @@ export default function Onboarding(): JSX.Element {
|
||||
} else if (pathname === ROUTES.GET_STARTED_AZURE_MONITORING) {
|
||||
handleModuleSelect(useCases.AzureMonitoring);
|
||||
handleNextStep();
|
||||
} else {
|
||||
handleBackNavigation();
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
}, [location.pathname]);
|
||||
|
||||
const [form] = Form.useForm<InviteMemberFormValues>();
|
||||
const [
|
||||
|
Loading…
x
Reference in New Issue
Block a user