Skip to content

Commit

Permalink
revert unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
DiogoSoaress committed Dec 13, 2023
1 parent 54cd336 commit 62db557
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
10 changes: 8 additions & 2 deletions src/components/Campaign/Hero/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Button, Chip, Container, Grid, Typography } from '@mui/material'
import Link from 'next/link'
import css from './styles.module.css'
import type { TypeHeroSkeleton } from '@/contentful/types'
import type { Entry } from 'contentful'
Expand Down Expand Up @@ -47,7 +48,12 @@ const Hero = (props: HeroEntry) => {
</Typography>

{isEntryTypeButton(button) ? (
<a href={appendSearchParamsToURL(button.fields.btnHref, searchParams)} target="_blank" rel="noreferrer">
<Link
href={appendSearchParamsToURL(button.fields.btnHref, searchParams)}
target="_blank"
rel="noreferrer"
passHref
>
<Button
variant="contained"
size="large"
Expand All @@ -60,7 +66,7 @@ const Hero = (props: HeroEntry) => {
>
{button.fields.btnCopy}
</Button>
</a>
</Link>
) : undefined}
</Grid>

Expand Down
7 changes: 6 additions & 1 deletion src/components/Campaign/TextBlockBanner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ const TextBlockBanner = (props: TextBlockBannerEntry) => {
</Typography>

{isEntryTypeButton(button) ? (
<Link href={appendSearchParamsToURL(button.fields.btnHref, searchParams)}>
<Link
href={appendSearchParamsToURL(button.fields.btnHref, searchParams)}
target="_blank"
rel="noreferrer"
passHref
>
<Button
variant="contained"
size="large"
Expand Down
7 changes: 6 additions & 1 deletion src/components/Campaign/TextBlockCentered/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ const TextBlockCentered = (props: TextBlockCenteredEntry) => {
<Typography color="primary.light">{description}</Typography>

{isEntryTypeButton(button) ? (
<Link href={appendSearchParamsToURL(button.fields.btnHref, searchParams)}>
<Link
href={appendSearchParamsToURL(button.fields.btnHref, searchParams)}
target="_blank"
rel="noreferrer"
passHref
>
<Button
variant="contained"
size="large"
Expand Down
11 changes: 3 additions & 8 deletions src/components/common/HeaderCTA/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { BaseBlock } from '@/components/Home/types'
import LinkButton from '@/components/common/LinkButton'
import { Grid, Typography } from '@mui/material'
import NextLink from 'next/link'
import Link from 'next/link'
import css from './styles.module.css'
import SearchParamsContext from '@/contexts/SearchParamsContext'
import { useContext } from 'react'
Expand All @@ -27,16 +27,11 @@ const HeaderCTA = (props: HeaderCTAProps) => {
</Grid>
{props.link && (
<Grid item xs={12} md={4} className={`${css.linkButton} ${!props.bigTitle && css.alignEnd}`}>
<NextLink
href={appendSearchParamsToURL(props.link.href, searchParams)}
target="_blank"
rel="noreferrer"
passHref
>
<Link href={appendSearchParamsToURL(props.link.href, searchParams)} target="_blank" rel="noreferrer" passHref>
<LinkButton className={css.shortPadding} onClick={props.onClick}>
{props.link.title}
</LinkButton>
</NextLink>
</Link>
</Grid>
)}
</Grid>
Expand Down

0 comments on commit 62db557

Please sign in to comment.