Disable friend shuffeling due to matching issues

This commit is contained in:
Kevin Kandlbinder 2021-06-24 00:04:33 +00:00 committed by GitHub
parent 2d2a29e08c
commit 9321180fb7

View file

@ -31,13 +31,13 @@ export const query = graphql`
const FriendsPage = ({ data }) => { const FriendsPage = ({ data }) => {
const { t } = useI18next(); const { t } = useI18next();
function shuffle(a) { /*function shuffle(a) {
for (let i = a.length - 1; i > 0; i--) { for (let i = a.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1)); const j = Math.floor(Math.random() * (i + 1));
[a[i], a[j]] = [a[j], a[i]]; [a[i], a[j]] = [a[j], a[i]];
} }
return a; return a;
} }*/
return ( return (
<Layout title={t("friends")} description={t("friendsDescription")}> <Layout title={t("friends")} description={t("friendsDescription")}>
@ -52,7 +52,7 @@ const FriendsPage = ({ data }) => {
</p> </p>
<div className={styles.friendsList}> <div className={styles.friendsList}>
{shuffle(data.allFriendsJson.nodes).map((friend) => { {/*shuffle(*/data.allFriendsJson.nodes/*)*/.map((friend) => {
return ( return (
<div <div
className={styles.friendProfile} className={styles.friendProfile}
@ -61,14 +61,15 @@ const FriendsPage = ({ data }) => {
<div <div
className={styles.friendImage} className={styles.friendImage}
style={{ backgroundImage: "url(" + friend.imageURL + ")" }} style={{ backgroundImage: "url(" + friend.imageURL + ")" }}
key={friend.url + "#" + friend.name + "#image"}
> >
<span className={styles.friendName}>{friend.name}</span> <span className={styles.friendName} key={friend.url + "#" + friend.name + "#name"}>{friend.name}</span>
<span className={styles.friendTitle}> <span className={styles.friendTitle} key={friend.url + "#" + friend.name + "#profession"}>
{friend.profession} {friend.profession}
</span> </span>
</div> </div>
<div className={styles.contactLinks}> <div className={styles.contactLinks} key={friend.url + "#" + friend.name + "#links"}>
<a <a
className={styles.contactLink} className={styles.contactLink}
href={friend.url} href={friend.url}