refactor: use proper config for routes

This commit is contained in:
Your Name
2026-04-11 19:51:00 +05:30
parent 9953b27385
commit 73a9787daf
3 changed files with 2 additions and 7 deletions
+1 -5
View File
@@ -36,17 +36,13 @@ export default function Login() {
setIsLoading(true);
setApiError(null);
try {
// 1. Authenticate
const { data: authData } = await publicApi.post(endpoints.LOGIN, data);
// 2. Fetch User Profile with the fresh token
// We pass the header explicitly to avoid any race conditions with interceptors
const { data: userData } = await api.get(endpoints.ME, {
headers: { Authorization: `Bearer ${authData.access}` },
});
// 3. Update store using the hook method
await login(authData.access, userData);
login(authData.access, userData);
navigate(ROUTES.DRAWER);
} catch (err) {
-1
View File
@@ -33,7 +33,6 @@ export default function VerifyEmail() {
type="button"
className="text-xs italic opacity-40 cursor-pointer underline"
onClick={() => window.close()}
onKeyDown={(e) => e.key === "Enter" && window.close()}
>
You can close this window now.
</button>