mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 23:05: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 => {
|
const handleNext = (): void => {
|
||||||
if (activeStep <= 3) {
|
if (activeStep <= 3) {
|
||||||
handleNextStep();
|
history.push(moduleRouteMap[selectedModule.id as ModulesMap]);
|
||||||
history.replace(moduleRouteMap[selectedModule.id as ModulesMap]);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -258,6 +257,13 @@ export default function Onboarding(): JSX.Element {
|
|||||||
updateSelectedDataSource(null);
|
updateSelectedDataSource(null);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleBackNavigation = (): void => {
|
||||||
|
setCurrent(0);
|
||||||
|
setActiveStep(1);
|
||||||
|
setSelectedModule(useCases.APM);
|
||||||
|
resetProgress();
|
||||||
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const { pathname } = location;
|
const { pathname } = location;
|
||||||
|
|
||||||
@ -277,9 +283,11 @@ export default function Onboarding(): JSX.Element {
|
|||||||
} else if (pathname === ROUTES.GET_STARTED_AZURE_MONITORING) {
|
} else if (pathname === ROUTES.GET_STARTED_AZURE_MONITORING) {
|
||||||
handleModuleSelect(useCases.AzureMonitoring);
|
handleModuleSelect(useCases.AzureMonitoring);
|
||||||
handleNextStep();
|
handleNextStep();
|
||||||
|
} else {
|
||||||
|
handleBackNavigation();
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, []);
|
}, [location.pathname]);
|
||||||
|
|
||||||
const [form] = Form.useForm<InviteMemberFormValues>();
|
const [form] = Form.useForm<InviteMemberFormValues>();
|
||||||
const [
|
const [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user