Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React, { FC } from 'react';
import { ActivityBaseView } from './ActivityBaseView';
import { ActivityViewProps } from './ActivityViewProps';
import replaceQuotesInOldDescription from '../../../../shared/utils/replaceQuotesInOldDescription';
import { ActivitySubject } from '../types/ActivitySubject';
import ActivityDescriptionByType from '../../../../shared/components/ActivityDescription/ActivityDescriptionByType';
import { ActivityEventType } from '../../../../../core/apollo/generated/graphql-schema';
import ActivitySubjectMarkdown from './ActivitySubjectMarkdown';

interface ActivityCalloutPostCommentCreatedViewProps extends ActivityViewProps {
post: ActivitySubject;
Expand All @@ -21,14 +20,12 @@ export const ActivityCalloutPostCommentCreatedView: FC<ActivityCalloutPostCommen
type,
footerComponent,
}) => {
const comment = replaceQuotesInOldDescription(description);

return (
<ActivityBaseView
author={author}
loading={loading}
type={type}
title={<ActivityDescriptionByType activityType={type} subject={comment} />}
title={<ActivitySubjectMarkdown>{description}</ActivitySubjectMarkdown>}
url={post.profile.url}
footerComponent={footerComponent}
contextDisplayName={post.profile.displayName}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React, { FC } from 'react';
import { ActivityBaseView } from './ActivityBaseView';
import { ActivityViewProps } from './ActivityViewProps';
import replaceQuotesInOldDescription from '../../../../shared/utils/replaceQuotesInOldDescription';
import ActivityDescriptionByType from '../../../../shared/components/ActivityDescription/ActivityDescriptionByType';
import { ActivityCalloutValues } from '../../../../shared/types/ActivityCalloutValues';
import { ActivityEventType } from '../../../../../core/apollo/generated/graphql-schema';
import ActivitySubjectMarkdown from './ActivitySubjectMarkdown';

interface ActivityDiscussionCommentCreatedViewProps extends ActivityViewProps {
callout: ActivityCalloutValues;
Expand All @@ -21,14 +20,12 @@ export const ActivityDiscussionCommentCreatedView: FC<ActivityDiscussionCommentC
type,
footerComponent,
}) => {
const comment = replaceQuotesInOldDescription(description);

return (
<ActivityBaseView
author={author}
loading={loading}
type={type}
title={<ActivityDescriptionByType activityType={type} subject={comment} />}
title={<ActivitySubjectMarkdown>{description}</ActivitySubjectMarkdown>}
url={callout.framing.profile.url}
footerComponent={footerComponent}
contextDisplayName={callout.framing.profile.displayName}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react';
import WrapperMarkdown from '../../../../../core/ui/markdown/WrapperMarkdown';

interface ActivitySubjectMarkdownProps {
children: string;
}

const ActivitySubjectMarkdown = ({ children }: ActivitySubjectMarkdownProps) => {
return (
<WrapperMarkdown plain card caption>
{children}
</WrapperMarkdown>
);
};

export default ActivitySubjectMarkdown;
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React, { FC } from 'react';
import { ActivityBaseView } from './ActivityBaseView';
import { ActivityViewProps } from './ActivityViewProps';
import { buildUpdatesUrl } from '../../../../../main/routing/urlBuilders';
import ActivityDescriptionByType from '../../../../shared/components/ActivityDescription/ActivityDescriptionByType';
import { ActivityEventType } from '../../../../../core/apollo/generated/graphql-schema';
import ActivitySubjectMarkdown from './ActivitySubjectMarkdown';

export interface ActivityUpdateSentViewProps extends ActivityViewProps {
message: string;
Expand All @@ -27,7 +27,7 @@ export const ActivityUpdateSentView: FC<ActivityUpdateSentViewProps> = ({
type={type}
author={author}
loading={loading}
title={<ActivityDescriptionByType activityType={type} subject={message} />}
title={<ActivitySubjectMarkdown>{message}</ActivitySubjectMarkdown>}
url={url}
footerComponent={footerComponent}
contextDisplayName={journeyDisplayName}
Expand Down
3 changes: 0 additions & 3 deletions src/domain/shared/utils/replaceQuotesInOldDescription.ts

This file was deleted.