refactor(starter): upgrade to new version of gatsby

This commit is contained in:
Alexander Shelepenok
2022-01-09 20:12:31 +00:00
parent 84bdc5899d
commit 67ebabbaac
397 changed files with 26665 additions and 34984 deletions

View File

@@ -0,0 +1,32 @@
import React from "react";
import { Icon } from "@/components/Icon";
import { Dictionary } from "@/types";
import { getContactHref, getIcon } from "@/utils";
import styles from "./Contacts.module.scss";
type Props = {
contacts: Dictionary<string>;
};
const Contacts: React.FC<Props> = ({ contacts }: Props) => (
<div className={styles.contacts}>
<ul className={styles.contacts__list}>
{Object.keys(contacts).map(name => (
<li className={styles["contacts__list-item"]} key={name}>
<a
className={styles["contacts__list-item-link"]}
href={getContactHref(name, contacts[name])}
rel="noopener noreferrer"
target="_blank"
>
<Icon name={name} icon={getIcon(name)} />
</a>
</li>
))}
</ul>
</div>
);
export default Contacts;