From 2f24057093dbbb541d8de39bc7cc2a0ac5f8949d Mon Sep 17 00:00:00 2001 From: Christopher Date: Mon, 16 Dec 2024 18:27:06 +0000 Subject: [PATCH] Remove legacy ActivityFeed code --- .../activities/DirectoryFormsApi.jsx | 33 ------------------- .../activities/card/ActivityCardNotes.jsx | 27 --------------- 2 files changed, 60 deletions(-) delete mode 100644 src/client/components/ActivityFeed/activities/card/ActivityCardNotes.jsx diff --git a/src/client/components/ActivityFeed/activities/DirectoryFormsApi.jsx b/src/client/components/ActivityFeed/activities/DirectoryFormsApi.jsx index 2f740f3ea3a..c3f94748576 100644 --- a/src/client/components/ActivityFeed/activities/DirectoryFormsApi.jsx +++ b/src/client/components/ActivityFeed/activities/DirectoryFormsApi.jsx @@ -8,7 +8,6 @@ import CardUtils from './card/CardUtils' import ActivityCardWrapper from './card/ActivityCardWrapper' import ActivityCardLabels from './card/ActivityCardLabels' import ActivityCardSubject from './card/ActivityCardSubject' -import ActivityCardNotes from './card/ActivityCardNotes' import ActivityCardMetadata from './card/ActivityCardMetadata' import ActivityOverviewSummary from './card/item-renderers/ActivityOverviewSummary' @@ -104,38 +103,6 @@ export default class DirectoryFormsApi extends React.PureComponent { ) - } else { - kind = 'great.gov.uk Enquiry' - const metadata = [ - { label: 'Date', value: format(sentDate) }, - { - label: 'Name', - value: `${formData.first_name} ${formData.last_name}`, - }, - { label: 'Job title', value: formData.position }, - { label: 'Email', value: formData.email }, - ] - return isOverview ? ( - - ) : ( - - Enquiry - - - - - ) } } } diff --git a/src/client/components/ActivityFeed/activities/card/ActivityCardNotes.jsx b/src/client/components/ActivityFeed/activities/card/ActivityCardNotes.jsx deleted file mode 100644 index e50db5be14c..00000000000 --- a/src/client/components/ActivityFeed/activities/card/ActivityCardNotes.jsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react' -import PropTypes from 'prop-types' -import { FONT_SIZE, FONT_WEIGHTS, SPACING } from '@govuk-react/constants' -import styled from 'styled-components' - -const StyledCardNotes = styled('div')` - font-size: ${FONT_SIZE.SIZE_16}; - font-weight: ${FONT_WEIGHTS.regular}; - line-height: ${FONT_SIZE.SIZE_24}; - margin-bottom: ${SPACING.SCALE_1}; -` - -const ActivityCardNotes = ({ notes, maxLength = 255 }) => ( - - {notes.length < maxLength - ? notes - : notes.slice(0, maxLength).split(' ').slice(0, -1).join(' ') + - ' ...'}{' '} - -) - -ActivityCardNotes.propTypes = { - notes: PropTypes.string.isRequired, - maxLength: PropTypes.number, -} - -export default ActivityCardNotes