We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53d1166 commit fea0cc6Copy full SHA for fea0cc6
src/app/signup/page.tsx
@@ -66,6 +66,11 @@ const SignupPage: React.FC = () => {
66
67
const handleNext = () => {
68
setCurrentStep((prev) => prev + 1);
69
+ // window.history.pushState(
70
+ // { step: currentStep + 1 },
71
+ // '',
72
+ // `/signup?step=${currentStep + 1}`
73
+ // );
74
};
75
76
const handleUpdate = (data: Partial<typeof formData>) => {
@@ -105,6 +110,12 @@ const SignupPage: React.FC = () => {
105
110
}
106
111
107
112
113
+useEffect(() => {
114
+ const searchParams = new URLSearchParams(window.location.search);
115
+ const stepFromUrl = parseInt(searchParams.get('step') || '1', 10);
116
+ setCurrentStep(stepFromUrl);
117
+}, []);
118
+
108
119
useEffect(() => {
109
120
const handleBeforeUnload = (e: BeforeUnloadEvent) => {
121
e.preventDefault();
0 commit comments