From fd9da41700859f909a6d87ec60996702e2898dfa Mon Sep 17 00:00:00 2001 From: jominjimail Date: Sun, 22 Dec 2019 19:54:55 +0900 Subject: [PATCH] [hotfix] other thumbNail is not found --- client/src/components/Portfolio/index.tsx | 7 ++++--- client/src/containers/CreatorContainer.tsx | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/components/Portfolio/index.tsx b/client/src/components/Portfolio/index.tsx index 1c2d1f94..284f0051 100644 --- a/client/src/components/Portfolio/index.tsx +++ b/client/src/components/Portfolio/index.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react'; +import React, { useState, useEffect, useRef } from 'react'; import { useSelector } from 'react-redux'; import * as S from './style'; import StyledLink from '../../basics/StyledLink'; @@ -30,7 +30,7 @@ const Portfolio:React.FC = ({ const showFollowersPopup = () => { setShowFollowers(true); }; const closeFollowingsPopup = () => { setShowFollowings(false); }; const showFollowingsPopup = () => { setShowFollowings(true); }; - const thumbnailUrl = useSelector((state:RootState) => state.login.thumbnailUrl); + const thumbnailUrl = useRef(''); const onClickFollow = () => { if (followable) { @@ -67,6 +67,7 @@ const Portfolio:React.FC = ({ } else { setFollowable(true); } + thumbnailUrl.current = data.thumbnailUrl; } }); } @@ -88,7 +89,7 @@ const Portfolio:React.FC = ({ - + {isLogin diff --git a/client/src/containers/CreatorContainer.tsx b/client/src/containers/CreatorContainer.tsx index e7ea09b4..ef8d1c96 100644 --- a/client/src/containers/CreatorContainer.tsx +++ b/client/src/containers/CreatorContainer.tsx @@ -5,7 +5,6 @@ import styled from 'styled-components'; import { useSelector } from 'react-redux'; import { API_SERVER } from '../utils/constants'; import { theme } from '../style/theme'; -// import FeedMyWorks from '../components/FeedMyWorks'; import Portfolio from '../components/Portfolio'; import FeedMyWorkContainer from './FeedMyWorkContainer'; import { RootState } from '../modules';