aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/src/app/common/AppBar.tsx
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-08-04 02:31:59 +0800
committercrupest <crupest@outlook.com>2020-08-04 02:31:59 +0800
commit89806d334fe2c7ef0ea8b3d12c74759e8e3ba860 (patch)
tree47b85b9bfb5026743a4a9984c5c24b8363e8a5af /Timeline/ClientApp/src/app/common/AppBar.tsx
parentff94145165d6877e47db7ec11c4d3b802f6f3532 (diff)
downloadtimeline-89806d334fe2c7ef0ea8b3d12c74759e8e3ba860.tar.gz
timeline-89806d334fe2c7ef0ea8b3d12c74759e8e3ba860.tar.bz2
timeline-89806d334fe2c7ef0ea8b3d12c74759e8e3ba860.zip
...
Diffstat (limited to 'Timeline/ClientApp/src/app/common/AppBar.tsx')
-rw-r--r--Timeline/ClientApp/src/app/common/AppBar.tsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Timeline/ClientApp/src/app/common/AppBar.tsx b/Timeline/ClientApp/src/app/common/AppBar.tsx
index 061ba08c..8349aef7 100644
--- a/Timeline/ClientApp/src/app/common/AppBar.tsx
+++ b/Timeline/ClientApp/src/app/common/AppBar.tsx
@@ -5,14 +5,15 @@ import { Navbar, NavbarToggler, Collapse, Nav, NavItem } from 'reactstrap';
import { useMediaQuery } from 'react-responsive';
import { useTranslation } from 'react-i18next';
-import { useUser, useAvatarUrl } from '../data/user';
+import { useUser, useAvatar } from '../data/user';
import TimelineLogo from './TimelineLogo';
+import BlobImage from './BlobImage';
const AppBar: React.FC = (_) => {
const history = useHistory();
const user = useUser();
- const avatarUrl = useAvatarUrl(user?.username);
+ const avatar = useAvatar(user?.username);
const { t } = useTranslation();
@@ -34,9 +35,9 @@ const AppBar: React.FC = (_) => {
<div className="ml-auto mr-2">
{user != null ? (
<NavLink to={`/users/${user.username}`}>
- <img
+ <BlobImage
className="avatar small rounded-circle bg-white"
- src={avatarUrl}
+ blob={avatar}
/>
</NavLink>
) : (