Added rel Button attribute + fixed mastodon verification (#262)

Co-authored-by: Kali <git@kalitsune.cloud>
This commit is contained in:
-ˏˋ Maple ˊˎ 2022-11-06 19:22:10 +01:00 committed by GitHub
parent 15123676ec
commit 9a1d328f35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -8,7 +8,7 @@ import { trackMatomoEvent } from '../../analytics/matomo';
import { addShadow } from '../../utils';
function Button(props) {
const { name, href, displayName, logo, styles, alt, icon } = props;
const { name, href, displayName, logo, styles, alt, icon, rels } = props;
const handleClick = () => {
const eventName = `${name}-button`;
@ -30,7 +30,7 @@ function Button(props) {
className={(styles ? 'button' : `button button-${name}`) + addShadow()}
href={href}
target={runtimeConfig?.BUTTON_TARGET || '_blank'}
rel="noopener noreferrer"
rel={rels ? rels : 'noopener noreferrer'}
onClick={handleClick}
style={styles ? styles : undefined}
title={alt || displayName}
@ -59,4 +59,5 @@ Button.propType = {
logo: string,
icon: string,
styles: object,
rels: string,
};

View File

@ -410,6 +410,7 @@ function Home(props) {
<Button
name="mastodon"
href={runtimeConfig.MASTODON}
rels="me noopener noreferrer"
displayName="Mastodon"
logo={mastodonLogo}
order={buttonOrder('MASTODON')}