Skip to content

Commit

Permalink
Make CDCP first and open in a new tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles-Pham committed Nov 15, 2024
1 parent 5026d0a commit b03642d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
40 changes: 20 additions & 20 deletions graphql/mappers/contact-us.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ export async function getContactUsContent() {
heading: response?.data.schPageV1ByPath.item.scTitleEn,
subHeading: introFragment?.scContentEn?.json[0].content[0].value,
links: [
{
linkId: cdcpContactFragment?.scId,
linkTitle: cdcpContactFragment?.scLinkTextEn,
linkAssistiveTitle: cdcpContactFragment?.scLinkTextAssistiveEn,
linkDestination: cdcpContactFragment?.scDestinationURLEn,
linkDescription: cdcpContactFragment?.scDescriptionEn?.json
? cdcpContactFragment.scDescriptionEn.json[0].content[0].value
: '',
schBetaPopup: cdcpContactFragment?.schBetaPopUp,
},
{
linkId: eiContactFragment?.scId,
linkTitle: eiContactFragment?.scLinkTextEn,
Expand Down Expand Up @@ -156,16 +166,6 @@ export async function getContactUsContent() {
: '',
schBetaPopup: sinContactFragment?.schBetaPopUp,
},
{
linkId: cdcpContactFragment?.scId,
linkTitle: cdcpContactFragment?.scLinkTextEn,
linkAssistiveTitle: cdcpContactFragment?.scLinkTextAssistiveEn,
linkDestination: cdcpContactFragment?.scDestinationURLEn,
linkDescription: cdcpContactFragment?.scDescriptionEn?.json
? cdcpContactFragment.scDescriptionEn.json[0].content[0].value
: '',
schBetaPopup: cdcpContactFragment?.schBetaPopUp,
},
],
},
fr: {
Expand All @@ -182,6 +182,16 @@ export async function getContactUsContent() {
heading: response?.data.schPageV1ByPath.item.scTitleFr,
subHeading: introFragment?.scContentFr?.json[0].content[0].value,
links: [
{
linkId: cdcpContactFragment?.scId,
linkTitle: cdcpContactFragment?.scLinkTextFr,
linkAssistiveTitle: cdcpContactFragment?.scLinkTextAssistiveFr,
linkDestination: cdcpContactFragment?.scDestinationURLFr,
linkDescription: cdcpContactFragment?.scDescriptionFr?.json
? cdcpContactFragment.scDescriptionFr.json[0].content[0].value
: '',
schBetaPopup: cdcpContactFragment?.schBetaPopUp,
},
{
linkId: eiContactFragment?.scId,
linkTitle: eiContactFragment?.scLinkTextFr,
Expand Down Expand Up @@ -222,16 +232,6 @@ export async function getContactUsContent() {
: '',
schBetaPopup: sinContactFragment?.schBetaPopUp,
},
{
linkId: cdcpContactFragment?.scId,
linkTitle: cdcpContactFragment?.scLinkTextFr,
linkAssistiveTitle: cdcpContactFragment?.scLinkTextAssistiveFr,
linkDestination: cdcpContactFragment?.scDestinationURLFr,
linkDescription: cdcpContactFragment?.scDescriptionFr?.json
? cdcpContactFragment.scDescriptionFr.json[0].content[0].value
: '',
schBetaPopup: cdcpContactFragment?.schBetaPopUp,
},
],
},
}
Expand Down
2 changes: 2 additions & 0 deletions pages/contact-us/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ const ContactLanding = (props: ContactLandingProps) => {
const newTabExceptions: string[] = [
'https://www.canada.ca/en/employment-social-development/corporate/contact/sin.html',
'https://www.canada.ca/fr/emploi-developpement-social/ministere/coordonnees/nas.html',
'https://www.canada.ca/en/services/benefits/dental/dental-care-plan/contact.html',
'https://www.canada.ca/fr/services/prestations/dentaire/regime-soins-dentaires/contactez.html',
]

return (
Expand Down

0 comments on commit b03642d

Please sign in to comment.