Skip to content

Commit

Permalink
feat: remove verify message button linking to checkwho
Browse files Browse the repository at this point in the history
  • Loading branch information
halfwhole committed Oct 16, 2023
1 parent ae740a3 commit dc81eef
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 37 deletions.
3 changes: 1 addition & 2 deletions public/locales/gov/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
"builtBy": "https://open.gov.sg",
"linkedin": "https://sg.linkedin.com/company/open-government-products",
"facebook": "https://www.facebook.com/opengovsg",
"apiDoc": "https://guide.go.gov.sg/developer-guide/api-documentation",
"verifyMessages": "https://check.go.gov.sg"
"apiDoc": "https://guide.go.gov.sg/developer-guide/api-documentation"
},
"builtBy": "Built by Open Government Products"
},
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

26 changes: 0 additions & 26 deletions src/client/app/components/BaseLayout/BaseLayoutHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import GoLogoMiniLight from '@assets/go-logo-graphics/go-main-logo-mini-light.sv
import helpIcon from '@assets/shared/help-icon.svg'
import logoutIcon from '@assets/components/app/base-layout/logout-icon.svg'
import logoutWhiteIcon from '@assets/components/app/base-layout/logout-white-icon.svg'
import checkwhoIcon from '@assets/components/app/base-layout/checkwho-icon.svg'
import directoryIcon from '@assets/components/app/base-layout/directory-icon.svg'
import feedbackIcon from '@assets/components/app/base-layout/feedback-icon.svg'
import githubIcon from '@assets/components/app/base-layout/github-icon.svg'
Expand All @@ -28,7 +27,6 @@ import homeIcon from '@assets/components/app/base-layout/home-icon.svg'
import Section from '../Section'
import loginActions from '../../../login/actions'
import { GoGovReduxState } from '../../reducers/types'
import assetVariant from '../../../../shared/util/asset-variant'

type StyleProps = {
isLoggedIn: boolean
Expand Down Expand Up @@ -121,21 +119,6 @@ type BaseLayoutHeaderProps = {
toStick: boolean
}

type HeaderButtonProps = {
text: string
link: string
public: boolean
icon: string
mobileOrder?: number
internalLink?: boolean
displayNotEnabledForVariant?: string[]
}

function isEnabledForAssetVariant(header: HeaderButtonProps) {
if (header.displayNotEnabledForVariant === undefined) return true
return !header.displayNotEnabledForVariant.includes(assetVariant)
}

const BaseLayoutHeader: FunctionComponent<BaseLayoutHeaderProps> = ({
backgroundType,
hideNavButtons = false,
Expand Down Expand Up @@ -211,14 +194,6 @@ const BaseLayoutHeader: FunctionComponent<BaseLayoutHeaderProps> = ({
icon: feedbackIcon,
mobileOrder: 5,
},
{
text: 'Verify Messages',
link: i18next.t('general.links.verifyMessages'),
public: true,
icon: checkwhoIcon,
mobileOrder: 6,
displayNotEnabledForVariant: ['edu', 'health'],
},
]

const appBarBtn = isLoggedIn ? (
Expand Down Expand Up @@ -302,7 +277,6 @@ const BaseLayoutHeader: FunctionComponent<BaseLayoutHeaderProps> = ({
{!hideNavButtons &&
headers.map(
(header) =>
isEnabledForAssetVariant(header) &&
(header.public ? !isLoggedIn : isLoggedIn) && (
<Button
href={
Expand Down

0 comments on commit dc81eef

Please sign in to comment.