mirror of
https://github.com/techno-tim/littlelink-server.git
synced 2025-01-10 13:17:38 +01:00
Added rel Button attribute + fixed mastodon verification (#262)
Co-authored-by: Kali <git@kalitsune.cloud>
This commit is contained in:
parent
15123676ec
commit
9a1d328f35
@ -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,
|
||||
};
|
||||
|
@ -410,6 +410,7 @@ function Home(props) {
|
||||
<Button
|
||||
name="mastodon"
|
||||
href={runtimeConfig.MASTODON}
|
||||
rels="me noopener noreferrer"
|
||||
displayName="Mastodon"
|
||||
logo={mastodonLogo}
|
||||
order={buttonOrder('MASTODON')}
|
||||
|
Loading…
Reference in New Issue
Block a user