import React from "react"; import Layout from "../layouts/default"; import { Trans, useI18next } from "gatsby-plugin-react-i18next"; import { graphql } from "gatsby"; import PropTypes from "prop-types"; import * as styles from "./friends.module.scss"; export const query = graphql` query AllFriendsQuery($language: String!) { allFriendsJson { nodes { name profession url imageURL } } locales: allLocale(filter: { language: { eq: $language } }) { edges { node { ns data language } } } } `; const FriendsPage = ({ data }) => { const { t } = useI18next(); /*function shuffle(a) { for (let i = a.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)); [a[i], a[j]] = [a[j], a[i]]; } return a; }*/ return (

social

friendsDescription

{ /*shuffle(*/ data.allFriendsJson.nodes /*)*/ .map((friend) => { return (
{friend.name} {friend.profession}
); }) }
); }; FriendsPage.propTypes = { data: PropTypes.object.isRequired, }; export default FriendsPage;