From 2ed982f0c298cadbec1f7d5f924ab5ffb75e2a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Fri, 9 Feb 2024 14:56:24 +0000 Subject: [PATCH] feat: Move 'Change' button from section headers --- .../components/shared/Preview/SummaryList.tsx | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/editor.planx.uk/src/@planx/components/shared/Preview/SummaryList.tsx b/editor.planx.uk/src/@planx/components/shared/Preview/SummaryList.tsx index 742af6f432..0b37f08729 100644 --- a/editor.planx.uk/src/@planx/components/shared/Preview/SummaryList.tsx +++ b/editor.planx.uk/src/@planx/components/shared/Preview/SummaryList.tsx @@ -114,8 +114,6 @@ function SummaryListsBySections(props: SummaryListsBySectionsProps) { state.getSortedBreadcrumbsBySection, ]); - const { trackBackwardsNavigation } = useAnalyticsTracking(); - const isValidComponent = ([nodeId, userData]: BreadcrumbEntry) => { const node = props.flow[nodeId]; const doesNodeExist = Boolean(props.flow[nodeId]); @@ -160,11 +158,6 @@ function SummaryListsBySections(props: SummaryListsBySectionsProps) { .map(removeNonPresentationalNodes) .map((section) => section.map(makeSummaryBreadcrumb)); - const handleChangeAnswer = (id: string) => { - trackBackwardsNavigation("change", id); - props.changeAnswer(id); - }; - return ( <> {sectionsWithFilteredBreadcrumbs.map( @@ -184,25 +177,13 @@ function SummaryListsBySections(props: SummaryListsBySectionsProps) { > {props.flow[`${Object.keys(sections[i])[0]}`]?.data?.title} - - handleChangeAnswer(filteredBreadcrumbs[0].nodeId) - } - component="button" - fontSize="body1.fontSize" - > - Change - - the answers in this section - - ),