Skip to content

Commit

Permalink
[hotfix] other thumbNail is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
jominjimail committed Dec 22, 2019
1 parent 4d686f5 commit fd9da41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 4 additions & 3 deletions client/src/components/Portfolio/index.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -30,7 +30,7 @@ const Portfolio:React.FC<portfolioProp> = ({
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) {
Expand Down Expand Up @@ -67,6 +67,7 @@ const Portfolio:React.FC<portfolioProp> = ({
} else {
setFollowable(true);
}
thumbnailUrl.current = data.thumbnailUrl;
}
});
}
Expand All @@ -88,7 +89,7 @@ const Portfolio:React.FC<portfolioProp> = ({
</S.FollowLine>

</S.PortfolioDetail>
<S.PortfolioImage src={thumbnailUrl} />
<S.PortfolioImage src={thumbnailUrl.current} />
</S.PortfolioBox>
<S.IntroduceBox>
{isLogin
Expand Down
1 change: 0 additions & 1 deletion client/src/containers/CreatorContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit fd9da41

Please sign in to comment.