diff options
author | Brian Kim <brian@tagg.id> | 2021-06-15 12:28:32 +0900 |
---|---|---|
committer | Brian Kim <brian@tagg.id> | 2021-06-15 12:28:32 +0900 |
commit | db0678d647f774dcb1cd60513985d9b6fbd0e28b (patch) | |
tree | 00e62c1821d4973d214fdd47f8293749972c1925 /src/components/moments/MomentPostHeader.tsx | |
parent | a249f2d027c9cd5d7f20602cf79ec2265f60a54c (diff) | |
parent | 78f32c1400eff46d4c768b78fbaf672826c74285 (diff) |
Merge branch 'master' of https://github.com/TaggiD-Inc/Frontend
Diffstat (limited to 'src/components/moments/MomentPostHeader.tsx')
-rw-r--r-- | src/components/moments/MomentPostHeader.tsx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/components/moments/MomentPostHeader.tsx b/src/components/moments/MomentPostHeader.tsx index dc6a3cd9..5f26951a 100644 --- a/src/components/moments/MomentPostHeader.tsx +++ b/src/components/moments/MomentPostHeader.tsx @@ -10,7 +10,7 @@ import { import {useDispatch, useSelector, useStore} from 'react-redux'; import {loadUserMoments} from '../../store/actions'; import {RootState} from '../../store/rootReducer'; -import {ScreenType} from '../../types'; +import {MomentTagType, MomentType, ScreenType} from '../../types'; import {fetchUserX, userXInStore} from '../../utils'; import {MomentMoreInfoDrawer} from '../profile'; import TaggAvatar from '../profile/TaggAvatar'; @@ -19,19 +19,21 @@ interface MomentPostHeaderProps extends ViewProps { userXId?: string; screenType: ScreenType; username: string; - momentId: string; momentTagId: string; removeTag: () => Promise<void>; + moment: MomentType; + tags: MomentTagType[]; } const MomentPostHeader: React.FC<MomentPostHeaderProps> = ({ userXId, screenType, username, - momentId, style, momentTagId, removeTag, + moment, + tags, }) => { const [drawerVisible, setDrawerVisible] = useState(false); const dispatch = useDispatch(); @@ -62,20 +64,23 @@ const MomentPostHeader: React.FC<MomentPostHeaderProps> = ({ style={styles.avatar} userXId={userXId} screenType={screenType} + editable={false} /> <Text style={styles.headerText}>{username}</Text> </TouchableOpacity> <MomentMoreInfoDrawer isOpen={drawerVisible} setIsOpen={setDrawerVisible} - momentId={momentId} isOwnProfile={isOwnProfile} momentTagId={momentTagId} removeTag={removeTag} dismissScreenAndUpdate={() => { dispatch(loadUserMoments(loggedInUserId)); - navigation.pop(); + navigation.goBack(); }} + screenType={screenType} + moment={moment} + tags={tags} /> </View> ); |