mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-22 17:44:20 -08:00
Open external links in new tabs (#731)
* Open external links in new tabs - allow contact page mailto link opens in new tab - allow about page mailto link opens in new tab - comment against opening external links in same tab * Update snapshots
This commit is contained in:
parent
53c2d98eaa
commit
77a5f179a9
5 changed files with 16 additions and 1 deletions
|
@ -17,6 +17,11 @@ interface ILinkTypeWrapper {
|
|||
* instance to choose the type of link along with the props necessary to
|
||||
* set new tabs, classes.
|
||||
*
|
||||
* Note - if the link is an external link and will not open in a new
|
||||
* browser tab, ensure that hitting the back button works. This has shown to
|
||||
* have errors on edge cases (ie, launching the gmail client with mailto links)
|
||||
* and it is the recommendation to not have external links open in the same tab.
|
||||
*
|
||||
* @param props
|
||||
* @returns
|
||||
*/
|
||||
|
|
|
@ -302,6 +302,8 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
|
|||
For general feedback, email
|
||||
<a
|
||||
href="mailto:screeningtool.feedback@usds.gov"
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
screeningtool.feedback@usds.gov
|
||||
</a>
|
||||
|
|
|
@ -552,6 +552,8 @@ exports[`rendering of the DatasetContainer checks if various text fields are vis
|
|||
<a
|
||||
class="j40-aboutcard-link"
|
||||
href="mailto:screeningtool.feedback@usds.gov"
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
Email: screeningtool.feedback@usds.gov
|
||||
</a>
|
||||
|
|
|
@ -38,7 +38,12 @@ const ContactPage = ({location}: IContactPageProps) => {
|
|||
defaultMessage={CONTACT_COPY.CONTACT_VIA_EMAIL.DEFAULT_MESSAGE}
|
||||
values={{
|
||||
general_email_address:
|
||||
<a href={`mailto:${CONTACT_COPY.FEEDBACK_EMAIL}`}>{CONTACT_COPY.FEEDBACK_EMAIL}</a>,
|
||||
<a
|
||||
href={`mailto:${CONTACT_COPY.FEEDBACK_EMAIL}`}
|
||||
target="_blank"
|
||||
rel="noreferrer">
|
||||
{CONTACT_COPY.FEEDBACK_EMAIL}
|
||||
</a>,
|
||||
}}/>
|
||||
</p>
|
||||
</Grid>
|
||||
|
|
|
@ -123,6 +123,7 @@ const IndexPage = ({location}: IndexPageProps) => {
|
|||
header={intl.formatMessage(ABOUT_COPY.GET_INVOLVED.SEND_FEEDBACK_HEADING)}
|
||||
linkText={`Email: ${CONTACT_COPY.FEEDBACK_EMAIL}`}
|
||||
url={`mailto:${CONTACT_COPY.FEEDBACK_EMAIL}`}
|
||||
openUrlNewTab={true}
|
||||
internal={false}>
|
||||
<p>
|
||||
{intl.formatMessage(ABOUT_COPY.GET_INVOLVED.SEND_FEEDBACK_INFO)}
|
||||
|
|
Loading…
Add table
Reference in a new issue