aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/views/common/AppBar.tsx
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-02-13 21:23:30 +0800
committercrupest <crupest@outlook.com>2021-02-13 21:23:30 +0800
commitfe5128137f530daf8ca315cb89811121c6c2c9da (patch)
tree34cbdb7895e18d34779b2209a1e9aae0fde20cf2 /FrontEnd/src/app/views/common/AppBar.tsx
parentaeed3cb80d8c0a62d0ccc565733c4a213759c5bd (diff)
downloadtimeline-fe5128137f530daf8ca315cb89811121c6c2c9da.tar.gz
timeline-fe5128137f530daf8ca315cb89811121c6c2c9da.tar.bz2
timeline-fe5128137f530daf8ca315cb89811121c6c2c9da.zip
...
Diffstat (limited to 'FrontEnd/src/app/views/common/AppBar.tsx')
-rw-r--r--FrontEnd/src/app/views/common/AppBar.tsx10
1 files changed, 4 insertions, 6 deletions
diff --git a/FrontEnd/src/app/views/common/AppBar.tsx b/FrontEnd/src/app/views/common/AppBar.tsx
index d0e39f98..e682a308 100644
--- a/FrontEnd/src/app/views/common/AppBar.tsx
+++ b/FrontEnd/src/app/views/common/AppBar.tsx
@@ -4,14 +4,13 @@ import { LinkContainer } from "react-router-bootstrap";
import { Navbar, Nav } from "react-bootstrap";
import { NavLink } from "react-router-dom";
-import { useUser, useAvatar } from "@/services/user";
+import { useUser } from "@/services/user";
import TimelineLogo from "./TimelineLogo";
-import BlobImage from "./BlobImage";
+import UserAvatar from "./user/UserAvatar";
const AppBar: React.FC = (_) => {
const user = useUser();
- const avatar = useAvatar(user?.username);
const { t } = useTranslation();
@@ -70,10 +69,9 @@ const AppBar: React.FC = (_) => {
<Nav className="ml-auto mr-2 align-items-center">
{user != null ? (
<LinkContainer to={`/users/${user.username}`}>
- <BlobImage
+ <UserAvatar
+ username={user.username}
className="avatar small rounded-circle bg-white cursor-pointer ml-auto"
- onClick={collapse}
- blob={avatar}
/>
</LinkContainer>
) : (