Skip to content

Commit

Permalink
remove option to re-amend amendment
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewHEguardian committed Oct 16, 2023
1 parent d0b775c commit 74a7f25
Showing 1 changed file with 2 additions and 30 deletions.
32 changes: 2 additions & 30 deletions client/components/mma/holiday/HolidayReview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { css } from '@emotion/react';
import { space, until } from '@guardian/source-foundations';
import { Button, InlineError } from '@guardian/source-react-components';
import { useContext, useState } from 'react';
import { Link, Navigate, useLocation, useNavigate } from 'react-router-dom';
import { Link, Navigate, useLocation } from 'react-router-dom';
import type { DateRange } from '../../../../shared/dates';
import { DATE_FNS_INPUT_FORMAT, dateString } from '../../../../shared/dates';
import type { ProductDetail } from '../../../../shared/productResponse';
Expand Down Expand Up @@ -95,10 +95,8 @@ export const HolidayReview = () => {
publicationsImpacted,
holidayStopResponse,
existingHolidayStopToAmend,
setExistingHolidayStopToAmend,
} = useContext(HolidayStopsContext) as HolidayStopsContextInterface;

const navigate = useNavigate();
const location = useLocation();
const routerState = location.state as HolidayStopsRouterState;

Expand Down Expand Up @@ -217,7 +215,7 @@ export const HolidayReview = () => {
css={[
buttonBarCss,
{
justifyContent: 'space-between',
justifyContent: 'flex-end',
marginTop: '20px',
[until.mobileMedium]: {
flexDirection: 'column',
Expand All @@ -226,37 +224,11 @@ export const HolidayReview = () => {
},
]}
>
<div
css={{
marginTop: '20px',
alignSelf: 'flex-start',
}}
>
<Button
onClick={() => {
setExistingHolidayStopToAmend({
dateRange: selectedRange,
publicationsImpacted,
mutabilityFlags: {
isEndDateEditable: true,
isFullyMutable: true,
},
});
navigate('../amend', {
state: routerState,
});
}}
priority="secondary"
>
Amend
</Button>
</div>
<div
css={[
buttonBarCss,
{
marginTop: '20px',
alignSelf: 'flex-end',
},
]}
>
Expand Down

0 comments on commit 74a7f25

Please sign in to comment.