diff --git a/src/components/Button/Button.js b/src/components/Button/Button.js
index 6b23ae1..c871c60 100644
--- a/src/components/Button/Button.js
+++ b/src/components/Button/Button.js
@@ -5,7 +5,7 @@ import { runtimeConfig } from '../../config';
import { trackUmamiEvent } from '../../analytics/umami';
function Button(props) {
- const { name, href, displayName, logo, styles } = props;
+ const { name, href, displayName, logo, styles, alt } = props;
const handleClick = () => {
const eventName = `${name}-button`;
@@ -27,6 +27,7 @@ function Button(props) {
rel="noopener noreferrer"
onClick={handleClick}
style={styles ? styles : undefined}
+ title={alt || displayName}
>
{logo && (
diff --git a/src/components/Home/Home.js b/src/components/Home/Home.js
index 4eb88ef..d0c0003 100644
--- a/src/components/Home/Home.js
+++ b/src/components/Home/Home.js
@@ -61,19 +61,38 @@ function Home(props) {
const buttonColors = runtimeConfig.CUSTOM_BUTTON_COLOR?.split(',');
const textColors = runtimeConfig.CUSTOM_BUTTON_TEXT_COLOR?.split(',');
// have to clean up some of the strings to standardize for analytics
- return texts.map((t, i) => (
-
- ));
+
+ return texts.map((t, i) => {
+ // do not try to render button unless it has all of the required props
+ return (
+
+ {names &&
+ names[i] &&
+ urls &&
+ urls[i] &&
+ texts &&
+ texts[i] &&
+ buttonColors &&
+ buttonColors[i] &&
+ textColors &&
+ textColors[i] &&
+ altTexts &&
+ altTexts[i] && (
+
+ )}
+
+ );
+ });
};
return (
diff --git a/src/components/Sort/__test__/__snapshots__/Sort.test.js.snap b/src/components/Sort/__test__/__snapshots__/Sort.test.js.snap
index eefabd0..35c31e6 100644
--- a/src/components/Sort/__test__/__snapshots__/Sort.test.js.snap
+++ b/src/components/Sort/__test__/__snapshots__/Sort.test.js.snap
@@ -8,6 +8,7 @@ Array [
onClick={[Function]}
rel="noopener noreferrer"
target="_blank"
+ title="LinkedIn"
>