diff options
author | Ivan Chen <ivan@tagg.id> | 2021-03-29 14:13:06 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-03-29 14:13:06 -0400 |
commit | 59f64faa456b7f4852eef3d9281afde8d8f46e9a (patch) | |
tree | dfb481a3dfb80b3ba5bf55b76fd4bbea33ea5232 /src | |
parent | f16ab73dbda9ac345c85837b48966ef6574876ed (diff) |
fix linter warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/components/profile/PublicProfile.tsx | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/components/profile/PublicProfile.tsx b/src/components/profile/PublicProfile.tsx index a70e8e50..8d597986 100644 --- a/src/components/profile/PublicProfile.tsx +++ b/src/components/profile/PublicProfile.tsx @@ -30,20 +30,20 @@ import {moveCategory, normalize, SCREEN_HEIGHT} from '../../utils'; import {TaggPrompt} from '../common'; import {Moment} from '../moments'; -const PublicProfile: React.FC<ContentProps> = ({y, userXId, screenType}) => { +const PublicProfile: React.FC<ContentProps> = ({userXId, screenType}) => { const dispatch = useDispatch(); - const {profile = NO_PROFILE} = userXId - ? useSelector((state: RootState) => state.userX[screenType][userXId]) - : useSelector((state: RootState) => state.user); + const {profile = NO_PROFILE} = useSelector((state: RootState) => + userXId ? state.userX[screenType][userXId] : state.user, + ); - const {moments = EMPTY_MOMENTS_LIST} = userXId - ? useSelector((state: RootState) => state.userX[screenType][userXId]) - : useSelector((state: RootState) => state.moments); + const {moments = EMPTY_MOMENTS_LIST} = useSelector((state: RootState) => + userXId ? state.userX[screenType][userXId] : state.moments, + ); - const {momentCategories = []} = userXId - ? useSelector((state: RootState) => state.userX[screenType][userXId]) - : useSelector((state: RootState) => state.momentCategories); + const {momentCategories = []} = useSelector((state: RootState) => + userXId ? state.userX[screenType][userXId] : state.momentCategories, + ); const {user: loggedInUser = NO_USER} = useSelector( (state: RootState) => state.user, @@ -117,10 +117,12 @@ const PublicProfile: React.FC<ContentProps> = ({y, userXId, screenType}) => { setTimeout(navigateToMomentUploadPrompt, 2000); } }, [ + userXId, profile.profile_completion_stage, momentCategories, - userXId, isStageOnePromptClosed, + navigation, + screenType, ]), ); @@ -188,7 +190,7 @@ const PublicProfile: React.FC<ContentProps> = ({y, userXId, screenType}) => { <TaggPrompt messageHeader={UPLOAD_MOMENT_PROMPT_TWO_HEADER} messageBody={UPLOAD_MOMENT_PROMPT_TWO_MESSAGE} - logoType="" + logoType="tagg" onClose={() => { setIsStageTwoPromptClosed(true); }} @@ -200,7 +202,7 @@ const PublicProfile: React.FC<ContentProps> = ({y, userXId, screenType}) => { <TaggPrompt messageHeader={UPLOAD_MOMENT_PROMPT_THREE_HEADER} messageBody={UPLOAD_MOMENT_PROMPT_THREE_MESSAGE} - logoType="" + logoType="tagg" onClose={() => { setIsStageThreePromptClosed(true); }} |