Skip to content

Commit

Permalink
Stop passing localNavItems prop into layout
Browse files Browse the repository at this point in the history
  • Loading branch information
cgsunkel committed Jan 4, 2024
1 parent a287fa5 commit 206cde5
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const CompanyActivityFeed = ({
isGlobalUltimate,
dnbHierarchyCount,
apiEndpoint,
localNavItems,
flashMessages,
}) => {
const actions = (
Expand All @@ -37,7 +36,6 @@ const CompanyActivityFeed = ({
<CompanyLayout
company={company}
breadcrumbs={[{ text: 'Activity Feed' }]}
localNavItems={localNavItems}
flashMessages={flashMessages}
>
<ActivityFeedApp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ const CompanyBusinessDetails = ({
globalUltimate,
isDnbPending,
companyId,
localNavItems,
flashMessages,
csrfToken,
permissions,
Expand All @@ -67,7 +66,6 @@ const CompanyBusinessDetails = ({
<CompanyLayout
company={company}
breadcrumbs={[{ text: 'Business details' }]}
localNavItems={localNavItems}
flashMessages={flashMessages}
csrfToken={csrfToken}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ const CardContainer = styled('div')`
margin-bottom: 20px;
`

const CompanyOverview = ({ companyId, localNavItems, flashMessages }) => (
const CompanyOverview = ({ companyId, flashMessages }) => (
<CompanyResource id={companyId}>
{(company) => (
<CompanyLayout
company={company}
breadcrumbs={[{ text: 'Overview' }]}
localNavItems={localNavItems}
flashMessages={flashMessages}
>
<GridRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ function ExportsHistory({
pageTitle,
isComplete,
returnUrl,
localNavItems,
}) {
const collectionListTask = {
name: 'Exports history',
Expand All @@ -61,7 +60,6 @@ function ExportsHistory({
{ text: pageTitle },
]}
returnUrl={returnUrl}
localNavItems={localNavItems}
>
<InsetText>
You can only see the history of countries that were added or edited
Expand Down
3 changes: 1 addition & 2 deletions src/apps/companies/apps/exports/client/ExportsIndex.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,14 @@ const StyledLink = styled(Link)`
margin-bottom: ${SPACING.SCALE_5};
`

const ExportsIndex = ({ companyId, returnUrl, localNavItems }) => {
const ExportsIndex = ({ companyId, returnUrl }) => {
return (
<CompanyResource id={companyId}>
{(company) => (
<CompanyLayout
company={company}
breadcrumbs={[{ text: 'Exports' }]}
returnUrl={returnUrl}
localNavItems={localNavItems}
>
<SummaryTable
caption="Exports"
Expand Down
2 changes: 0 additions & 2 deletions src/client/components/ActivityFeed/CollectionList/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ const CompanyActivityCollection = ({
selectedFilters,
currentAdviserId,
dnbHierarchyCount,
localNavItems,
flashMessages,
returnUrl,
...props
Expand Down Expand Up @@ -130,7 +129,6 @@ const CompanyActivityCollection = ({
<CompanyLayout
company={company}
breadcrumbs={[{ text: 'Activity Feed' }]}
localNavItems={localNavItems}
flashMessages={flashMessages}
returnUrl={returnUrl}
>
Expand Down
6 changes: 1 addition & 5 deletions src/client/components/Layout/CompanyLayout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const CompanyLayout = ({
breadcrumbs,
children,
returnUrl,
localNavItems,
isInvestment = false,
isLCP = false,
}) => (
Expand All @@ -24,10 +23,7 @@ const CompanyLayout = ({
returnUrl={returnUrl}
/>
<Main>
<CompanyTabbedLocalNavigation
localNavItems={localNavItems}
company={company}
/>
<CompanyTabbedLocalNavigation company={company} />
{isInvestment && (
<CompanyInvestmentSubNavigation companyId={company.id} isLCP={isLCP} />
)}
Expand Down
2 changes: 0 additions & 2 deletions src/client/modules/Companies/AccountManagement/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ const objectiveMetadata = (objective) => {
}

const AccountManagement = ({
localNavItems,
companyId,
flashMessages,
csrfToken,
Expand All @@ -258,7 +257,6 @@ const AccountManagement = ({
<CompanyLayout
company={company}
breadcrumbs={[{ text: 'Account management' }]}
localNavItems={localNavItems}
flashMessages={flashMessages}
csrfToken={csrfToken}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,13 @@ import CompanyLayout from '../../../components/Layout/CompanyLayout'
import ProjectsCollection from '../../Investments/Projects/ProjectsCollection'
import { state2props } from '../../Investments/Projects/state'

const CompanyProjectsCollection = ({
companyId,
returnUrl,
localNavItems,
...props
}) => (
const CompanyProjectsCollection = ({ companyId, returnUrl, ...props }) => (
<CompanyResource id={companyId}>
{(company) => (
<CompanyLayout
company={company}
breadcrumbs={[{ text: 'Investment' }]}
returnUrl={returnUrl}
localNavItems={localNavItems}
isInvestment={true}
>
<ProjectsCollection company={company} {...props} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import CompanyLayout from '../../../../components/Layout/CompanyLayout'
import CreateLargeCapitalProfile from './CreateLargeCapitalProfile'
import EditLargeCapitalProfile from './EditLargeCapitalProfile'

const LargeCapitalProfile = ({ companyId, localNavItems, flashMessages }) => {
const LargeCapitalProfile = ({ companyId, flashMessages }) => {
return (
<LargeInvestorProfileResource id={companyId}>
{(profile) => (
Expand All @@ -19,7 +19,6 @@ const LargeCapitalProfile = ({ companyId, localNavItems, flashMessages }) => {
<CompanyLayout
company={company}
breadcrumbs={[{ text: 'Investments' }]}
localNavItems={localNavItems}
flashMessages={flashMessages}
isInvestment={true}
isLCP={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const CompanyContactsCollection = ({
optionMetadata,
selectedFilters,
returnUrl,
localNavItems,
...props
}) => {
const collectionListTask = {
Expand All @@ -42,7 +41,6 @@ const CompanyContactsCollection = ({
company={company}
breadcrumbs={[{ text: 'Contacts' }]}
returnUrl={returnUrl}
localNavItems={localNavItems}
>
{company.archived && (
<Details
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const CompanyOrdersCollection = ({
optionMetadata,
selectedFilters,
returnUrl,
localNavItems,
...props
}) => {
const collectionListTask = {
Expand Down Expand Up @@ -71,7 +70,6 @@ const CompanyOrdersCollection = ({
company={company}
breadcrumbs={[{ text: 'Orders (OMIS)' }]}
returnUrl={returnUrl}
localNavItems={localNavItems}
>
{company.archived && (
<Details
Expand Down

0 comments on commit 206cde5

Please sign in to comment.