diff --git a/client/src/App.jsx b/client/src/App.jsx
index 95e89c7..e5d2afd 100644
--- a/client/src/App.jsx
+++ b/client/src/App.jsx
@@ -18,6 +18,7 @@ import Volcano from "@/pages/volcano/Volcano.jsx";
import GlobalMap from "./pages/maps/GlobalMap.jsx";
import Admin from "./pages/admin/Admin.jsx";
import MyDashboard from "./pages/home/tabs/MyDashboard.jsx";
+import Settings from "./pages/auth/Settings.jsx";
function AppFoundation() {
const recipe = useRecipe({ key: "dashboard" });
@@ -81,6 +82,8 @@ function App() {
} />
+ } />
+
} />
} />
} />
diff --git a/client/src/pages/auth/Settings.jsx b/client/src/pages/auth/Settings.jsx
new file mode 100644
index 0000000..bd28e4c
--- /dev/null
+++ b/client/src/pages/auth/Settings.jsx
@@ -0,0 +1,126 @@
+import { Flex, Text, Input, Field, Button, Separator, NativeSelect, Image } from '@chakra-ui/react';
+import useAuthStore from "../../store/authStore.js";
+import { useForm } from "react-hook-form";
+import { useState } from "react";
+
+export default function Settings() {
+ const { user } = useAuthStore();
+ const { register, handleSubmit, errors } = useForm();
+ const [value, setValue] = useState(undefined);
+ const updateProfile = useAuthStore((state) => state.updateProfile);
+
+ const onSubmit = (data, event) => {
+ // TODO: check for identical usernames
+ event.preventDefault();
+ console.log(data);
+ if (data.username && data.username.length !== "") updateProfile(data);
+ }
+
+ const ivansRequest = () => {
+ console.log(user.username, "requested ivans permissions");
+ // TODO: log users request in database here which will then display request in web-admin page
+ }
+
+ return (
+
+ );
+}
diff --git a/client/src/store/authStore.js b/client/src/store/authStore.js
index abafe24..9c8ebde 100644
--- a/client/src/store/authStore.js
+++ b/client/src/store/authStore.js
@@ -86,7 +86,22 @@ const useAuthStore = create((set) => ({
} catch (error) {
console.error("Failed to save layout to database", error);
}
- }
+ },
+
+ // updateProfile: async (newProfile) => {
+ // try {
+ // set((state) => ({
+ // user: {
+ // ...state.user,
+ // username: newProfile.username,
+ // }
+ // }));
+ //
+ // await api.post('profile/update/', { profile: newProfile });
+ // } catch (error) {
+ // console.error("Failed to update profile", error);
+ // }
+ // }
}));
export default useAuthStore;
\ No newline at end of file