diff --git a/apps/web/components/Dashboard/UI/LeftMenu.tsx b/apps/web/components/Dashboard/UI/LeftMenu.tsx
index a4bac0f1..e3264974 100644
--- a/apps/web/components/Dashboard/UI/LeftMenu.tsx
+++ b/apps/web/components/Dashboard/UI/LeftMenu.tsx
@@ -35,12 +35,12 @@ function LeftMenu() {
className='flex flex-col w-24 bg-black h-screen text-white shadow-xl'>
-
+
-
+
@@ -51,15 +51,21 @@ function LeftMenu() {
-
-
-
-
-
+
+
+
+
+
+
-
{auth.user.username}
diff --git a/apps/web/components/Dashboard/User/UserEditGeneral/UserEditGeneral.tsx b/apps/web/components/Dashboard/User/UserEditGeneral/UserEditGeneral.tsx
new file mode 100644
index 00000000..edb12d11
--- /dev/null
+++ b/apps/web/components/Dashboard/User/UserEditGeneral/UserEditGeneral.tsx
@@ -0,0 +1,100 @@
+import { useAuth } from '@components/Security/AuthContext';
+import { updateProfile } from '@services/settings/profile';
+import React, { useEffect } from 'react'
+import { Formik, Form, Field, ErrorMessage } from 'formik';
+
+function UserEditGeneral() {
+ const auth = useAuth() as any;
+
+
+ useEffect(() => {
+ }
+ , [auth, auth.user])
+
+ return (
+
+ {auth.user && (
+ {
+ setTimeout(() => {
+
+ setSubmitting(false);
+ updateProfile(values,auth.user.id)
+ }, 400);
+ }}
+ >
+ {({ isSubmitting }) => (
+
+
+ )}
+
+ )}
+
+ )
+}
+
+export default UserEditGeneral
\ No newline at end of file
diff --git a/apps/web/components/Dashboard/User/UserEditPassword/UserEditPassword.tsx b/apps/web/components/Dashboard/User/UserEditPassword/UserEditPassword.tsx
new file mode 100644
index 00000000..f11a962b
--- /dev/null
+++ b/apps/web/components/Dashboard/User/UserEditPassword/UserEditPassword.tsx
@@ -0,0 +1,66 @@
+import { useAuth } from '@components/Security/AuthContext';
+import { updatePassword } from '@services/settings/password';
+import { Formik, Form, Field, ErrorMessage } from 'formik';
+import React, { useEffect } from 'react'
+
+function UserEditPassword() {
+ const auth = useAuth() as any;
+
+ const updatePasswordUI = async (values: any) => {
+ let user_id = auth.userInfo.user_object.user_id;
+ await updatePassword(user_id, values)
+ }
+
+ useEffect(() => {
+ }
+ , [auth])
+
+
+ return (
+
+ {
+ setTimeout(() => {
+ setSubmitting(false);
+ updatePasswordUI(values)
+ }, 400);
+ }}
+ >
+ {({ isSubmitting }) => (
+
+
+ )}
+
+
+ )
+}
+
+export default UserEditPassword
\ No newline at end of file
diff --git a/apps/web/components/Objects/Menu/ProfileArea.tsx b/apps/web/components/Objects/Menu/ProfileArea.tsx
index a613697c..bffc5e9f 100644
--- a/apps/web/components/Objects/Menu/ProfileArea.tsx
+++ b/apps/web/components/Objects/Menu/ProfileArea.tsx
@@ -8,6 +8,7 @@ import { getNewAccessTokenUsingRefreshToken, getUserInfo } from "@services/auth/
import { usePathname } from "next/navigation";
import { useRouter } from "next/router";
import path from "path";
+import { Settings } from "lucide-react";
export interface Auth {
access_token: string;
@@ -92,7 +93,7 @@ function ProfileArea() {
-
+
)}
@@ -104,22 +105,7 @@ const AccountArea = styled.div`
display: flex;
place-items: center;
- a{
- // center the gear icon
- display: flex;
- place-items: center;
- place-content: center;
- width: 29px;
- height: 29px;
- border-radius: 19px;
- background: #F5F5F5;
-
- // hover effect
- &:hover{
- background: #E5E5E5;
-
- }
- }
+
div {
margin-right: 10px;
diff --git a/apps/web/components/Security/HeaderProfileBox.tsx b/apps/web/components/Security/HeaderProfileBox.tsx
index 6f712198..8821941c 100644
--- a/apps/web/components/Security/HeaderProfileBox.tsx
+++ b/apps/web/components/Security/HeaderProfileBox.tsx
@@ -30,11 +30,11 @@ export const HeaderProfileBox = () => {
{auth.isAuthenticated && (
{auth.userInfo.username}
-
+
)}
diff --git a/apps/web/services/courses/chapters.ts b/apps/web/services/courses/chapters.ts
index 26c54c81..6782c967 100644
--- a/apps/web/services/courses/chapters.ts
+++ b/apps/web/services/courses/chapters.ts
@@ -1,4 +1,4 @@
-import { OrderPayload } from "@components/Dashboard/EditCourseStructure/EditCourseStructure";
+import { OrderPayload } from "@components/Dashboard/Course/EditCourseStructure/EditCourseStructure";
import { getAPIUrl } from "@services/config/config";
import { RequestBody, RequestBodyWithAuthHeader, errorHandling } from "@services/utils/ts/requests";
diff --git a/apps/web/services/settings/profile.ts b/apps/web/services/settings/profile.ts
index adfb3045..401d5afe 100644
--- a/apps/web/services/settings/profile.ts
+++ b/apps/web/services/settings/profile.ts
@@ -6,8 +6,8 @@ import { RequestBody, errorHandling } from "@services/utils/ts/requests";
GET requests are called from the frontend using SWR (https://swr.vercel.app/)
*/
-export async function updateProfile(data: any) {
- const result: any = await fetch(`${getAPIUrl()}users/user_id/` + data.user_id, RequestBody("PUT", data, null))
+export async function updateProfile(data: any,user_id: number) {
+ const result: any = await fetch(`${getAPIUrl()}users/` + user_id, RequestBody("PUT", data, null))
const res = await errorHandling(result);
return res;
}