From 621722fe13f65be4e53616081fb6af95fe516fcb Mon Sep 17 00:00:00 2001 From: Jonathon Herbert Date: Thu, 25 Apr 2024 10:26:36 +0100 Subject: [PATCH] Pass platform into client, using platform to conditionally display Feast search UI --- fronts-client/src/components/FeedSection.tsx | 10 +++++----- fronts-client/src/types/Edition.ts | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/fronts-client/src/components/FeedSection.tsx b/fronts-client/src/components/FeedSection.tsx index 621d51feb44..1611681082d 100644 --- a/fronts-client/src/components/FeedSection.tsx +++ b/fronts-client/src/components/FeedSection.tsx @@ -1,19 +1,19 @@ import React from 'react'; import { styled, theme } from 'constants/theme'; +import { selectors as editionsIssueSelectors } from '../bundles/editionsIssueBundle'; import SectionContent from './layout/SectionContent'; import FeedContainer from './FeedsContainer'; import Clipboard from './Clipboard'; import FeedSectionHeader from './FeedSectionHeader'; import { media } from 'util/mediaQueries'; import { connect } from 'react-redux'; -import { isMode } from 'selectors/pathSelectors'; import { State } from 'types/State'; import { FeastSearchContainer } from './feast/FeastSearchContainer'; interface Props { isClipboardOpen: boolean; - isEditions: boolean; + isFeast: boolean; } const FeedSectionContainer = styled.div` @@ -32,12 +32,12 @@ const FeedWrapper = styled.div<{ isClipboardOpen: boolean }>` isClipboardOpen ? `solid 1px ${theme.base.colors.borderColor}` : null}; `; -const FeedSection = ({ isClipboardOpen, isEditions }: Props) => ( +const FeedSection = ({ isClipboardOpen, isFeast }: Props) => ( - {isEditions ? : } + {isFeast ? : } @@ -45,7 +45,7 @@ const FeedSection = ({ isClipboardOpen, isEditions }: Props) => ( ); const mapStateToProps = (state: State) => ({ - isEditions: isMode(state, 'editions'), + isFeast: editionsIssueSelectors.selectAll(state)?.platform === 'feast', }); export default connect(mapStateToProps)(FeedSection); diff --git a/fronts-client/src/types/Edition.ts b/fronts-client/src/types/Edition.ts index 0c78b24a5cc..200f0fc87fd 100644 --- a/fronts-client/src/types/Edition.ts +++ b/fronts-client/src/types/Edition.ts @@ -37,6 +37,7 @@ interface EditionsIssue { launchedEmail: string; fronts: EditionsFront[]; lastProofedVersion?: string; + platform: string; } const issueVersionStatus = [