fix(button): fixes to Discord and Alt Email buttons (#31)

* fix(email): Fixed Alt Email link

* fix(discord): Added missing components for Discord button generation
This commit is contained in:
aaronoaks 2021-08-31 08:58:32 -05:00 committed by GitHub
parent dacc105542
commit 251a49fea5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import kitLogo from '../../icons/kit.svg';
import tiktokLogo from '../../icons/tiktok.svg'; import tiktokLogo from '../../icons/tiktok.svg';
import twitchLogo from '../../icons/twitch.svg'; import twitchLogo from '../../icons/twitch.svg';
import twitterLogo from '../../icons/twitter.svg'; import twitterLogo from '../../icons/twitter.svg';
import discordLogo from '../../icons/discord.svg';
import youtubeLogo from '../../icons/youtube.svg'; import youtubeLogo from '../../icons/youtube.svg';
import facebookLogo from '../../icons/facebook.svg'; import facebookLogo from '../../icons/facebook.svg';
import messengerLogo from '../../icons/messenger.svg'; import messengerLogo from '../../icons/messenger.svg';
@ -63,6 +64,14 @@ function Home(props) {
logo={twitterLogo} logo={twitterLogo}
/> />
)} )}
{runtimeConfig.DISCORD && (
<Button
name="discord"
href={runtimeConfig.DISCORD}
displayName="Discord"
logo={discordLogo}
/>
)}
{runtimeConfig.INSTAGRAM && ( {runtimeConfig.INSTAGRAM && (
<Button <Button
name="instagram" name="instagram"
@ -187,7 +196,7 @@ function Home(props) {
{runtimeConfig.EMAIL_ALT && ( {runtimeConfig.EMAIL_ALT && (
<Button <Button
name="default" name="default"
href={`mailto:${runtimeConfig.EMAIL_ALT_TEXT}`} href={`mailto:${runtimeConfig.EMAIL_ALT}`}
displayName={runtimeConfig.EMAIL_ALT_TEXT} displayName={runtimeConfig.EMAIL_ALT_TEXT}
logo={emailAltLogo} logo={emailAltLogo}
/> />

View File

@ -82,6 +82,9 @@ export const runtimeConfig =
TWITTER: nodeIsProduction TWITTER: nodeIsProduction
? process.env.TWITTER ? process.env.TWITTER
: process.env.RAZZLE_TWITTER, : process.env.RAZZLE_TWITTER,
DISCORD: nodeIsProduction
? process.env.DISCORD
: process.env.RAZZLE_DISCORD,
INSTAGRAM: nodeIsProduction INSTAGRAM: nodeIsProduction
? process.env.INSTAGRAM ? process.env.INSTAGRAM
: process.env.RAZZLE_INSTAGRAM, : process.env.RAZZLE_INSTAGRAM,