Skip to content

Commit

Permalink
Pass extra props to Avatar in UserAvatar
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Apr 21, 2021
1 parent 11e0232 commit ef29fdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/UserAvatar/UserAvatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react";
import PropTypes from "prop-types";
import { Avatar } from "@material-ui/core";

export default function UserAvatar({ name, alias }) {
export default function UserAvatar({ name, alias, ...rest }) {
const [userImageURL, setUserImageURL] = useState("");

// Load User Image from ECNDB
Expand Down Expand Up @@ -30,7 +30,7 @@ export default function UserAvatar({ name, alias }) {
}, [alias])

return (
<Avatar src={userImageURL}>
<Avatar src={userImageURL} {...rest}>
{name === "" ? null : name.charAt(0)}
</Avatar>
);
Expand Down

0 comments on commit ef29fdf

Please sign in to comment.