dont open meme link in new tab
This commit is contained in:
parent
0fcdbc7858
commit
e921d58f73
2 changed files with 4 additions and 2 deletions
|
@ -39,6 +39,7 @@ type Props = {
|
|||
dispatch: any,
|
||||
'aria-label'?: string,
|
||||
user: ?User,
|
||||
meme: ?boolean,
|
||||
};
|
||||
|
||||
// use forwardRef to allow consumers to pass refs to the button content if they want to
|
||||
|
@ -72,6 +73,7 @@ const Button = forwardRef<any, {}>((props: Props, ref: any) => {
|
|||
pathname,
|
||||
user,
|
||||
authSrc,
|
||||
meme,
|
||||
...otherProps
|
||||
} = props;
|
||||
|
||||
|
@ -147,7 +149,7 @@ const Button = forwardRef<any, {}>((props: Props, ref: any) => {
|
|||
// TODO: replace the below with an outbound link tracker for matomo
|
||||
return (
|
||||
<a
|
||||
target="_blank"
|
||||
target={meme ? '' : '_blank'}
|
||||
rel="noopener noreferrer"
|
||||
href={href || navigate}
|
||||
className={combinedClassName}
|
||||
|
|
|
@ -5,7 +5,7 @@ const memes = require('memes');
|
|||
export default function Meme() {
|
||||
return (
|
||||
<h1 className="home__meme">
|
||||
<Button button="link" href={memes.url}>
|
||||
<Button button="link" navigate={memes.url} meme>
|
||||
{memes.text}
|
||||
</Button>
|
||||
</h1>
|
||||
|
|
Loading…
Reference in a new issue