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';