diff --git a/src/app/[locale]/profile/page.tsx b/src/app/[locale]/profile/page.tsx
index db4d387..a4d9918 100644
--- a/src/app/[locale]/profile/page.tsx
+++ b/src/app/[locale]/profile/page.tsx
@@ -1,5 +1,13 @@
-const page = () => {
- return
page
;
+"use client";
+import { useRouter } from "@/shared/config/navigation";
+import { useEffect } from "react";
+
+const Profile = () => {
+ const router = useRouter();
+ useEffect(() => {
+ router.push("/profile/personal");
+ }, []);
+ return <>>;
};
-export default page;
+export default Profile;
diff --git a/src/features/BreadCrumbs/BreadCrumbs.tsx b/src/features/BreadCrumbs/BreadCrumbs.tsx
index 6026d07..d6ca14b 100644
--- a/src/features/BreadCrumbs/BreadCrumbs.tsx
+++ b/src/features/BreadCrumbs/BreadCrumbs.tsx
@@ -40,6 +40,8 @@ const BreadCrumbs: React.FC = ({
)}
{routes.map((route, i, array) => {
+ if (routes.length === 1 && routes[0] === "profile")
+ return null;
if (parseInt(route)) {
if (routes[0] === "news") {
return {query};
diff --git a/src/shared/config/authConfig.ts b/src/shared/config/authConfig.ts
index f4ad5f4..a764a8e 100644
--- a/src/shared/config/authConfig.ts
+++ b/src/shared/config/authConfig.ts
@@ -70,12 +70,12 @@ export const authConfig: AuthOptions = {
const res = await apiInstance.post("/users/login/", data);
- if (![200, 201].includes(res.status)) {
- return null;
+ if ([200, 201].includes(res.status)) {
+ const user = res.data;
+ return user;
}
- const user = res.data;
- return user;
+ return null;
},
}),
GoogleProvider({
@@ -90,11 +90,7 @@ export const authConfig: AuthOptions = {
strategy: "jwt",
},
callbacks: {
- async signIn({ account, profile, user }) {
- if (!profile?.email) {
- throw new Error("No Profile");
- }
-
+ async signIn({ account, user }) {
if (account?.provider === "google") {
const data = {
auth_token: account?.id_token,
diff --git a/src/widgets/forms/ForgotPasswordForm/confirm-code/confirm-code.tsx b/src/widgets/forms/ForgotPasswordForm/confirm-code/confirm-code.tsx
index 0c8259a..9a34346 100644
--- a/src/widgets/forms/ForgotPasswordForm/confirm-code/confirm-code.tsx
+++ b/src/widgets/forms/ForgotPasswordForm/confirm-code/confirm-code.tsx
@@ -44,9 +44,9 @@ const ConfirmCode: React.FC = ({
);
router.push("/sign-in/reset-code");
}
+ setLoader(false);
} catch (error) {
setError("An error ocured");
- } finally {
setLoader(false);
}
};
diff --git a/src/widgets/forms/ForgotPasswordForm/send-email/send-email.tsx b/src/widgets/forms/ForgotPasswordForm/send-email/send-email.tsx
index 2eb1d2b..774a825 100644
--- a/src/widgets/forms/ForgotPasswordForm/send-email/send-email.tsx
+++ b/src/widgets/forms/ForgotPasswordForm/send-email/send-email.tsx
@@ -57,7 +57,7 @@ const SendEmail: React.FC = ({