Skip to content

Commit 36ee9fc

Browse files
committed
fix: correct redirect path after OAuth profile completion; closes #111
1 parent 45019fc commit 36ee9fc

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/components/User/CompleteProfile.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,11 @@ const CompleteProfile: React.FC = () => {
7272
);
7373

7474
// Profile completed successfully, redirect to home
75-
navigate("/?auth=success");
76-
window.location.reload(); // Reload to update auth state
75+
// navigate("/?auth=success");
76+
// window.location.reload(); // Reload to update auth state
77+
// Use PUBLIC_URL to get the correct base path
78+
const baseUrl = process.env.PUBLIC_URL || "";
79+
window.location.href = `${baseUrl}/?auth=success`;
7780
} catch (err: unknown) {
7881
// setError(err.response?.data?.message || 'Failed to complete profile');
7982
if (axios.isAxiosError(err)) {

0 commit comments

Comments
 (0)