mirror of
https://github.com/techno-tim/littlelink-server.git
synced 2025-01-24 15:21:24 +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';
|
import { addShadow } from '../../utils';
|
||||||
|
|
||||||
function Button(props) {
|
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 handleClick = () => {
|
||||||
const eventName = `${name}-button`;
|
const eventName = `${name}-button`;
|
||||||
@ -30,7 +30,7 @@ function Button(props) {
|
|||||||
className={(styles ? 'button' : `button button-${name}`) + addShadow()}
|
className={(styles ? 'button' : `button button-${name}`) + addShadow()}
|
||||||
href={href}
|
href={href}
|
||||||
target={runtimeConfig?.BUTTON_TARGET || '_blank'}
|
target={runtimeConfig?.BUTTON_TARGET || '_blank'}
|
||||||
rel="noopener noreferrer"
|
rel={rels ? rels : 'noopener noreferrer'}
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
style={styles ? styles : undefined}
|
style={styles ? styles : undefined}
|
||||||
title={alt || displayName}
|
title={alt || displayName}
|
||||||
@ -59,4 +59,5 @@ Button.propType = {
|
|||||||
logo: string,
|
logo: string,
|
||||||
icon: string,
|
icon: string,
|
||||||
styles: object,
|
styles: object,
|
||||||
|
rels: string,
|
||||||
};
|
};
|
||||||
|
@ -410,6 +410,7 @@ function Home(props) {
|
|||||||
<Button
|
<Button
|
||||||
name="mastodon"
|
name="mastodon"
|
||||||
href={runtimeConfig.MASTODON}
|
href={runtimeConfig.MASTODON}
|
||||||
|
rels="me noopener noreferrer"
|
||||||
displayName="Mastodon"
|
displayName="Mastodon"
|
||||||
logo={mastodonLogo}
|
logo={mastodonLogo}
|
||||||
order={buttonOrder('MASTODON')}
|
order={buttonOrder('MASTODON')}
|
||||||
|
Loading…
Reference in New Issue
Block a user