actions.close()}>
-
+
+
)
diff --git a/net/web/src/User/Profile/Profile.styled.js b/net/web/src/User/Profile/Profile.styled.js
index b1dc6cd3..2779762f 100644
--- a/net/web/src/User/Profile/Profile.styled.js
+++ b/net/web/src/User/Profile/Profile.styled.js
@@ -6,16 +6,97 @@ export const ProfileWrapper = styled.div`
width: 100%;
height: 100%;
background-color: #f6f5ed;
- border-radius: 8px;
+ border-radius: 2px;
+ flex-direction: column;
+ padding: 16px;
+ align-items: center;
+
+ .header {
+ display: flex;
+ width: 100%;
+ flex-direction: row;
+ padding-bottom: 3em;
+ }
+
+ .title {
+ flex-grow: 1;
+ text-align: center;
+ font-size: 2em;
+ font-weight: bold;
+ }
.close {
- position: absolute;
- right: 0px;
- padding-right: 16px;
- padding-top: 8px;
- font-size: 1.5em;
- color: #888;
+ font-size: 24px;
+ color: #aaaaaa;
+ }
+
+ .profile {
+ display: flex;
+ flex-direction: row;
+ padding: 1em;
+ width: 66%;
+ }
+
+ .logo {
+ width: 100%;
+ height: 100%;
+ width: 200px;
+ height: 200px;
+ border: 1px solid #dddddd;
+ border-radius: 8px;
+ align-items: center;
+ cursor: pointer;
+ display: flex;
+ justify-content: center;
+ }
+
+ .avatar {
+ color: #888888;
+ font-size: 8em;
+ justify-content: center;
+ }
+
+ .logoedit {
+ align-self: flex-end;
+ font-size: 16px;
+ position: relative;
+ left: -24px;
cursor: pointer;
}
+
+ .detailedit {
+ font-size: 16px;
+ }
+
+ .unset {
+ font-style: italic;
+ color: #dddddd;
+ }
+
+ .details {
+ padding-left: 2em;
+ margin-left: 2em;
+ border-left: 0.5px solid #aaaaaa;
+ }
+
+ .name {
+ font-size: 1.5em;
+ padding-left: 8px;
+ }
+
+ .location {
+ font-size: 1.2em;
+ padding-left: 8px;
+ }
+
+ .description {
+ font-size: 1em;
+ padding-left: 8px;
+ }
`;
-
+
+export const CloseButton = styled(Button)`
+ font-size: 24px;
+ color: #aaaaaa;
+`;
+
diff --git a/net/web/src/User/Profile/useProfile.hook.js b/net/web/src/User/Profile/useProfile.hook.js
index 286d0a7c..7efa35f6 100644
--- a/net/web/src/User/Profile/useProfile.hook.js
+++ b/net/web/src/User/Profile/useProfile.hook.js
@@ -4,11 +4,21 @@ import { useNavigate } from "react-router-dom";
export function useProfile() {
- const [state, setState] = useState({});
+ const [state, setState] = useState({
+ name: '',
+ handle: '',
+ description: '',
+ location: '',
+ imageUrl: null
+ });
const navigate = useNavigate();
const app = useContext(AppContext);
+ const updateState = (value) => {
+ setState((s) => ({ ...s, ...value }));
+ }
+
const actions = {
close: () => {
navigate('/user')
@@ -16,6 +26,18 @@ export function useProfile() {
};
useEffect(() => {
+ if (app?.state?.Data?.profile) {
+ let profile = app.state.Data.profile;
+ if (profile.image != null) {
+ updateState({ imageUrl: app.actions.profileImageUrl() })
+ } else {
+ updateState({ imageUrl: '' })
+ }
+ updateState({ name: profile.name });
+ updateState({ handle: profile.handle });
+ updateState({ description: profile.description });
+ updateState({ location: profile.location });
+ }
}, [app])
return { state, actions };
diff --git a/net/web/src/User/SideBar/Identity/Identity.jsx b/net/web/src/User/SideBar/Identity/Identity.jsx
index 22578103..a9223975 100644
--- a/net/web/src/User/SideBar/Identity/Identity.jsx
+++ b/net/web/src/User/SideBar/Identity/Identity.jsx
@@ -1,6 +1,6 @@
import { Avatar, Image } from 'antd';
import React from 'react'
-import { IdentityWrapper } from './Identity.styled';
+import { IdentityWrapper, MenuWrapper } from './Identity.styled';
import { RightOutlined, EditOutlined, UserOutlined } from '@ant-design/icons';
import { useIdentity } from './useIdentity.hook';
import { Menu, Dropdown } from 'antd';
@@ -20,17 +20,14 @@ export function Identity() {
}
const menu = (
-
+
);
return (
diff --git a/net/web/src/User/SideBar/Identity/Identity.styled.js b/net/web/src/User/SideBar/Identity/Identity.styled.js
index cf536e32..6e0b8f23 100644
--- a/net/web/src/User/SideBar/Identity/Identity.styled.js
+++ b/net/web/src/User/SideBar/Identity/Identity.styled.js
@@ -1,4 +1,4 @@
-import { Button } from 'antd';
+import { Menu, Button } from 'antd';
import styled from 'styled-components';
export const IdentityWrapper = styled.div`
@@ -57,5 +57,9 @@ export const IdentityWrapper = styled.div`
color: #444444;
font-weight: bold;
}
-
`;
+
+export const MenuWrapper = styled(Menu)`
+ border-radius: 4px;
+`;
+