Skip to content

Commit

Permalink
Remove unused post membership
Browse files Browse the repository at this point in the history
  • Loading branch information
CarsonF committed Nov 30, 2023
1 parent 2d37d39 commit 573f2fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/components/posts/PostListItemCard/PostListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { PostListItemMenu } from './PostListItemMenu';
interface PostListItemCardProps extends StyleProps {
parent: PostableIdFragment;
post: PostListItemCardFragment;
includeMembership: boolean;
includeMembership?: boolean;
}

export const PostListItem = ({
Expand Down
15 changes: 2 additions & 13 deletions src/scenes/Partners/Detail/Tabs/Notes/PartnerDetailsNotes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,9 @@ import { PartnerPostListDocument as PostListQuery } from '../../PartnerPostList.
interface Props {
partner?: PostableIdFragment;
editPartner: (item: Many<EditablePartnerField>) => void;
includeMembership?: boolean | undefined;
}

export const PartnerDetailNotes = ({
partner,
includeMembership = false,
}: Props) => {
export const PartnerDetailNotes = ({ partner }: Props) => {
const [createPostState, createPost] = useDialog();

const posts = useListQuery(PostListQuery, {
Expand Down Expand Up @@ -49,7 +45,6 @@ export const PartnerDetailNotes = ({
spacing={0}
renderItem={(post) => (
<PostListItem
includeMembership={includeMembership}
parent={partner!} // if we have a post, we have a partner
post={post}
sx={{ pb: 3 }}
Expand All @@ -60,13 +55,7 @@ export const PartnerDetailNotes = ({
loading={!partner}
/>

{partner && (
<CreatePost
{...createPostState}
includeMembership={includeMembership}
parent={partner}
/>
)}
{partner && <CreatePost {...createPostState} parent={partner} />}
</ActionableSection>
);
};

0 comments on commit 573f2fd

Please sign in to comment.