From a13dcb5110245bb554d79e779c4942e6f5aaf18a Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Tue, 27 Apr 2021 10:46:17 -0400 Subject: refactored avatar --- src/components/profile/ProfilePreview.tsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/components/profile/ProfilePreview.tsx') diff --git a/src/components/profile/ProfilePreview.tsx b/src/components/profile/ProfilePreview.tsx index bea989d9..242a17e3 100644 --- a/src/components/profile/ProfilePreview.tsx +++ b/src/components/profile/ProfilePreview.tsx @@ -23,6 +23,7 @@ import { userXInStore, } from '../../utils'; import {addUserToRecentlySearched} from '../../utils/search'; +import {Avatar} from '../common'; /** * This component returns user's profile picture friended by username as a touchable component. @@ -48,7 +49,7 @@ const ProfilePreview: React.FC = ({ }) => { const navigation = useNavigation(); const {user: loggedInUser} = useSelector((state: RootState) => state.user); - const [avatar, setAvatar] = useState(null); + const [avatar, setAvatar] = useState(); const dispatch = useDispatch(); useEffect(() => { @@ -187,14 +188,7 @@ const ProfilePreview: React.FC = ({ - + {(previewType === 'Search' || previewType === 'Recent') && ( <> -- cgit v1.2.3-70-g09d2