aboutsummaryrefslogtreecommitdiff
path: root/src/components/moments/MomentPostHeader.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-06-09 19:28:55 -0400
committerGitHub <noreply@github.com>2021-06-09 19:28:55 -0400
commit117996a44ffdb7c9c517ab58ad8ea5cbe0dd01f1 (patch)
tree40daf3e5ba9b6930b163d544be4a86f3afaa377a /src/components/moments/MomentPostHeader.tsx
parentd13d12980555cb1f659ae5108c52f089a54c3f57 (diff)
parentba55d9a29aae0fea3c5a7e4cb0cc9140c7d0fe31 (diff)
Merge pull request #458 from shravyaramesh/tma907-edit-moments
[TMA-907] Edit Moment
Diffstat (limited to 'src/components/moments/MomentPostHeader.tsx')
-rw-r--r--src/components/moments/MomentPostHeader.tsx12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/components/moments/MomentPostHeader.tsx b/src/components/moments/MomentPostHeader.tsx
index dc6a3cd9..cde7639c 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();
@@ -68,7 +70,6 @@ const MomentPostHeader: React.FC<MomentPostHeaderProps> = ({
<MomentMoreInfoDrawer
isOpen={drawerVisible}
setIsOpen={setDrawerVisible}
- momentId={momentId}
isOwnProfile={isOwnProfile}
momentTagId={momentTagId}
removeTag={removeTag}
@@ -76,6 +77,9 @@ const MomentPostHeader: React.FC<MomentPostHeaderProps> = ({
dispatch(loadUserMoments(loggedInUserId));
navigation.pop();
}}
+ screenType={screenType}
+ moment={moment}
+ tags={tags}
/>
</View>
);