Skip to content

Commit

Permalink
Merge pull request #7183 from uktrade/revert/feat/company-page-export…
Browse files Browse the repository at this point in the history
…-win-banner

Revert "Merge pull request #7137 from uktrade/feat/company-page-expor…
  • Loading branch information
peterhudec authored Sep 24, 2024
2 parents 322a5a6 + 4b5e8df commit de2c09d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 41 deletions.
23 changes: 3 additions & 20 deletions src/client/components/CompanyLocalHeader/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,27 +119,9 @@ const hasAllocatedLeadIta = (company) =>
const hasManagedAccountDetails = (company) =>
company.oneListGroupTier && hasAllocatedLeadIta(company)

const DATA_HUB_HAS_MOVED_LINK =
'https://data-services-help.trade.gov.uk/data-hub/updates/announcements/export-wins-has-moved-to-data-hub/'

const DATA_HUB_HAS_MOVED_MESSAGE = (
<>
Historic export wins have now moved to Data Hub,{' '}
<Link
href={DATA_HUB_HAS_MOVED_LINK}
target="_blank"
rel="noopener noreferrer"
aria-label="Find out more about historic wins moved to Data Hub"
>
find out more
</Link>
.
</>
)

const CompanyLocalHeader = ({
breadcrumbs,
flashMessages = [],
flashMessages,
company,
csrfToken,
}) =>
Expand All @@ -151,7 +133,7 @@ const CompanyLocalHeader = ({
company.id,
company.name
)}
flashMessages={[[DATA_HUB_HAS_MOVED_MESSAGE, ...flashMessages]]}
flashMessages={flashMessages}
>
<GridRow>
<GridCol setWidth="two-thirds">
Expand All @@ -163,6 +145,7 @@ const CompanyLocalHeader = ({
Trading as: {company.tradingNames.join(', ')}
</LocalHeaderTradingNames>
)}

<StyledAddress data-test="address">
{addressToStringResource(company.address)}
</StyledAddress>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ describe('CompanyLocalHeader', () => {
cy.mountWithProvider(
<CompanyLocalHeader
breadcrumbs={[{ text: 'Test breadcrumb' }]}
flashMessages={null}
company={dnbGlobalUltimate}
dnbRelatedCompaniesCount={12345}
returnUrl={null}
Expand Down Expand Up @@ -227,6 +228,7 @@ describe('CompanyLocalHeader', () => {
cy.mountWithProvider(
<CompanyLocalHeader
breadcrumbs={[{ text: 'Test breadcrumb' }]}
flashMessages={null}
company={dnbUnderInvestigation}
dnbRelatedCompaniesCount={null}
returnUrl={null}
Expand Down Expand Up @@ -280,6 +282,7 @@ describe('CompanyLocalHeader', () => {
cy.mountWithProvider(
<CompanyLocalHeader
breadcrumbs={[{ text: 'Test breadcrumb' }]}
flashMessages={null}
company={archivedCompany}
dnbRelatedCompaniesCount={null}
returnUrl={null}
Expand Down
21 changes: 0 additions & 21 deletions test/functional/cypress/specs/companies/export-wins-moved-spec.js

This file was deleted.

0 comments on commit de2c09d

Please sign in to comment.