diff --git a/src/components/Person.js b/src/components/Person.js index fa8a5d82..b1e8597a 100644 --- a/src/components/Person.js +++ b/src/components/Person.js @@ -1,18 +1,26 @@ import React, { useState, useEffect, useRef } from 'react'; import PropTypes from 'prop-types'; import { name } from 'country-emoji'; -import * as icons from '../util/icons'; import { useParams } from '@remix-run/react'; +import * as icons from '../util/icons'; export default function Person({ person }) { const url = new URL(person.url); - const twitter = person.twitter ? `https://unavatar.io/${person.twitter.replace('@', '')}` : null; + const twitter = person.twitter + ? `https://unavatar.io/${person.twitter.replace('@', '')}` + : null; const website = `https://unavatar.io/${url.host}`; - const unavatar = person.twitter ? `${twitter}?fallback=${website}` : website; - const img = `https://images.weserv.nl/?url=${unavatar}&w=100&l=9&af&il&n=-1`; + const unavatar = person.twitter + ? `${twitter}?fallback=${website}&ttl=28d` + : website; + // const img = `https://images.weserv.nl/?url=${unavatar}&w=100&l=9&af&il&n=-1`; + const img = unavatar; const { tag: currentTag } = useParams(); return ( -
+
{person.name} { currentTarget.onerror = null; // prevents looping - currentTarget.src = "/default.png"; + currentTarget.src = '/default.png'; }} loading="lazy" /> @@ -44,8 +52,11 @@ export default function Person({ person }) {

{person.description}

    - {person.tags.map(tag => ( -
  • + {person.tags.map((tag) => ( +
  • {tag}
  • ))}