aboutsummaryrefslogtreecommitdiff
path: root/src/components/moments/MomentPostHeader.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-06-11 17:01:43 -0400
committerIvan Chen <ivan@tagg.id>2021-06-11 17:01:43 -0400
commitbcfbaf00f60b65ab5f8c38ff8766644a2496bed1 (patch)
treeaf2fd669cf1f4cd427e832a39ac9deb2cd7a1430 /src/components/moments/MomentPostHeader.tsx
parent47b087816844473be858adf766b2f538ecf6d0aa (diff)
parent17d3f1255bd7692772b675b09685a92b305e8d9b (diff)
Merge branch 'master' into tma904-moment-comment-revamp
# Conflicts: # src/components/moments/MomentPost.tsx # src/components/moments/MomentPostContent.tsx # src/services/MomentService.ts
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 64581e06..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();
@@ -69,7 +71,6 @@ const MomentPostHeader: React.FC<MomentPostHeaderProps> = ({
<MomentMoreInfoDrawer
isOpen={drawerVisible}
setIsOpen={setDrawerVisible}
- momentId={momentId}
isOwnProfile={isOwnProfile}
momentTagId={momentTagId}
removeTag={removeTag}
@@ -77,6 +78,9 @@ const MomentPostHeader: React.FC<MomentPostHeaderProps> = ({
dispatch(loadUserMoments(loggedInUserId));
navigation.goBack();
}}
+ screenType={screenType}
+ moment={moment}
+ tags={tags}
/>
</View>
);