From 9c0d1a08b9eff40065526aef99a066ebd251e6b7 Mon Sep 17 00:00:00 2001 From: Sergio Garcia Date: Wed, 10 Feb 2021 10:42:21 -0600 Subject: [PATCH] Removes picture with a generic avatar --- .../src/views/account/AccountView/Profile.js | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/moped-editor/src/views/account/AccountView/Profile.js b/moped-editor/src/views/account/AccountView/Profile.js index 5760b5dd49..6710e9762b 100644 --- a/moped-editor/src/views/account/AccountView/Profile.js +++ b/moped-editor/src/views/account/AccountView/Profile.js @@ -12,13 +12,7 @@ import { Typography, makeStyles, } from "@material-ui/core"; - -export const defaultUser = { - avatar: `${process.env.PUBLIC_URL}/static/images/avatars/robSpillar.jpeg`, - name: "Rob Spillar", - jobTitle: "Director of Transportation", - city: "Austin, TX", -}; +import { useUser } from "../../../auth/user"; const useStyles = makeStyles(() => ({ root: {}, @@ -31,22 +25,27 @@ const useStyles = makeStyles(() => ({ const Profile = ({ className, ...rest }) => { const classes = useStyles(); + const { user } = useUser(); return ( - + - {defaultUser.name} + {String(user?.userName ?? user?.attributes?.email).toLowerCase()} - {defaultUser.jobTitle} + {user?.userJobTitle ?? "Austin Transportation"} - {defaultUser.city} + {user?.userCity ?? "Austin, TX"}