mirror of
https://github.com/Unkn0wnCat/KevinK.dev.js.git
synced 2025-08-06 10:08:42 +02:00
Run prettier on code
This commit is contained in:
parent
d542206091
commit
b8057f0e25
51 changed files with 28270 additions and 26529 deletions
|
@ -1,13 +1,13 @@
|
|||
import React from "react"
|
||||
import React from "react";
|
||||
import Layout from "../layouts/default";
|
||||
import { Trans, Link, useI18next } from "gatsby-plugin-react-i18next"
|
||||
import { graphql } from 'gatsby'
|
||||
import PropTypes from "prop-types"
|
||||
import { Trans, Link, useI18next } from "gatsby-plugin-react-i18next";
|
||||
import { graphql } from "gatsby";
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
import * as styles from "./social.module.scss";
|
||||
|
||||
export const query = graphql`
|
||||
query AllSocialsQuery($language: String!) {
|
||||
query AllSocialsQuery($language: String!) {
|
||||
allSocialsJson {
|
||||
nodes {
|
||||
image
|
||||
|
@ -16,7 +16,7 @@ query AllSocialsQuery($language: String!) {
|
|||
url
|
||||
}
|
||||
}
|
||||
locales: allLocale(filter: {language: {eq: $language}}) {
|
||||
locales: allLocale(filter: { language: { eq: $language } }) {
|
||||
edges {
|
||||
node {
|
||||
ns
|
||||
|
@ -25,42 +25,58 @@ query AllSocialsQuery($language: String!) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
}
|
||||
`;
|
||||
|
||||
const SocialPage = ({ data }) => {
|
||||
const { t } = useI18next();
|
||||
return (
|
||||
<Layout title={t("social")} description={t("socialDescription")}>
|
||||
<section>
|
||||
<article>
|
||||
<h1>
|
||||
<Trans>social</Trans>
|
||||
</h1>
|
||||
|
||||
const { t } = useI18next();
|
||||
return (
|
||||
<Layout title={t("social")} description={t("socialDescription")}>
|
||||
<section>
|
||||
<article>
|
||||
<h1><Trans>social</Trans></h1>
|
||||
<p>
|
||||
<Trans i18nKey="socialDescriptionWithLink">
|
||||
socialDescriptionWith<Link to="/friends">Link</Link>
|
||||
</Trans>
|
||||
</p>
|
||||
|
||||
<p><Trans i18nKey="socialDescriptionWithLink">socialDescriptionWith<Link to="/friends">Link</Link></Trans></p>
|
||||
|
||||
<div className={styles.socialList}>
|
||||
{
|
||||
data.allSocialsJson.nodes.map((social) => {
|
||||
return (
|
||||
<a className={styles.socialCard} href={social.url} target="_blank" rel="noreferrer me" key={social.url}>
|
||||
<div className={styles.socialImage} style={{ backgroundImage: "url(" + social.image + ")" }}>
|
||||
<span className={styles.socialName}>{social.platformName}</span>
|
||||
<span className={styles.socialUsername}>{social.platformHandle}</span>
|
||||
</div>
|
||||
</a>
|
||||
);
|
||||
})
|
||||
}
|
||||
</div>
|
||||
</article>
|
||||
</section>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
||||
SocialPage.propTypes = {
|
||||
data: PropTypes.object.isRequired
|
||||
<div className={styles.socialList}>
|
||||
{data.allSocialsJson.nodes.map((social) => {
|
||||
return (
|
||||
<a
|
||||
className={styles.socialCard}
|
||||
href={social.url}
|
||||
target="_blank"
|
||||
rel="noreferrer me"
|
||||
key={social.url}
|
||||
>
|
||||
<div
|
||||
className={styles.socialImage}
|
||||
style={{ backgroundImage: "url(" + social.image + ")" }}
|
||||
>
|
||||
<span className={styles.socialName}>
|
||||
{social.platformName}
|
||||
</span>
|
||||
<span className={styles.socialUsername}>
|
||||
{social.platformHandle}
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</article>
|
||||
</section>
|
||||
</Layout>
|
||||
);
|
||||
};
|
||||
|
||||
export default SocialPage;
|
||||
SocialPage.propTypes = {
|
||||
data: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
export default SocialPage;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue