mirror of
https://github.com/BradNut/awesome-uses
synced 2025-09-08 17:40:31 +00:00
style: fix eslint issues (#437)
This commit is contained in:
parent
bffba4b313
commit
df662048f4
6 changed files with 25 additions and 18 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { useEffect, useState, forwardRef, useRef } from 'react';
|
import React, { useEffect, useState, useRef } from 'react';
|
||||||
|
|
||||||
function useInterval(callback, delay) {
|
function useInterval(callback, delay) {
|
||||||
const savedCallback = useRef();
|
const savedCallback = useRef();
|
||||||
|
|
@ -44,7 +44,7 @@ function useWickedFavIcon() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function FavIcon() {
|
export default function FavIcon() {
|
||||||
const { letter, index, canvasRef } = useWickedFavIcon();
|
const { /* letter, index, */ canvasRef } = useWickedFavIcon();
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<canvas
|
<canvas
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import * as icons from '../util/icons';
|
||||||
|
|
||||||
export default function Person({ person, currentTag }) {
|
export default function Person({ person, currentTag }) {
|
||||||
const url = new URL(person.url);
|
const url = new URL(person.url);
|
||||||
const img = `https://images.weserv.nl/?url=https://unavatar.now.sh/${url.host}&w=100&l=9&af&il&n=-1`
|
const img = `https://images.weserv.nl/?url=https://unavatar.now.sh/${url.host}&w=100&l=9&af&il&n=-1`;
|
||||||
return (
|
return (
|
||||||
<PersonWrapper>
|
<PersonWrapper>
|
||||||
<PersonInner>
|
<PersonInner>
|
||||||
|
|
@ -23,11 +23,10 @@ export default function Person({ person, currentTag }) {
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className="displayLink"
|
className="displayLink"
|
||||||
href={person.url}
|
href={person.url}
|
||||||
>{`${url.host}${
|
>
|
||||||
url.pathname.endsWith('/')
|
{url.host}
|
||||||
? url.pathname.substr(0, url.pathname.length - 1)
|
{url.pathname.replace(/\/$/, '')}
|
||||||
: url.pathname
|
</a>
|
||||||
}`}</a>
|
|
||||||
</header>
|
</header>
|
||||||
<p>{person.description}</p>
|
<p>{person.description}</p>
|
||||||
<Tags>
|
<Tags>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { useEffect, useState, useRef } from 'react';
|
import React from 'react';
|
||||||
import { Link } from 'gatsby';
|
import { Link } from 'gatsby';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import Helmet from 'react-helmet';
|
import Helmet from 'react-helmet';
|
||||||
|
|
@ -34,10 +34,14 @@ function Header({ siteTitle, siteDescription, siteUrl }) {
|
||||||
}
|
}
|
||||||
Header.propTypes = {
|
Header.propTypes = {
|
||||||
siteTitle: PropTypes.string,
|
siteTitle: PropTypes.string,
|
||||||
|
siteDescription: PropTypes.string,
|
||||||
|
siteUrl: PropTypes.string,
|
||||||
};
|
};
|
||||||
|
|
||||||
Header.defaultProps = {
|
Header.defaultProps = {
|
||||||
siteTitle: ``,
|
siteTitle: '',
|
||||||
|
siteDescription: '',
|
||||||
|
siteUrl: '',
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Header;
|
export default Header;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React from "react"
|
import React from 'react';
|
||||||
import { useStaticQuery, graphql } from "gatsby"
|
import { useStaticQuery, graphql } from 'gatsby';
|
||||||
import Img from "gatsby-image"
|
import Img from 'gatsby-image';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This component is built using `gatsby-image` to automatically serve optimized
|
* This component is built using `gatsby-image` to automatically serve optimized
|
||||||
|
|
@ -24,9 +24,9 @@ const Image = () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`)
|
`);
|
||||||
|
|
||||||
return <Img fluid={data.placeholderImage.childImageSharp.fluid} />
|
return <Img fluid={data.placeholderImage.childImageSharp.fluid} />;
|
||||||
}
|
};
|
||||||
|
|
||||||
export default Image
|
export default Image;
|
||||||
|
|
|
||||||
|
|
@ -44,5 +44,9 @@ const FilterProvider = function({ children }) {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
FilterProvider.propTypes = {
|
||||||
|
children: React.Children,
|
||||||
|
};
|
||||||
|
|
||||||
export default FilterContext;
|
export default FilterContext;
|
||||||
export { FilterProvider };
|
export { FilterProvider };
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ export function countries() {
|
||||||
.reduce((acc, country) => {
|
.reduce((acc, country) => {
|
||||||
if (acc[country.name]) {
|
if (acc[country.name]) {
|
||||||
// exists, update
|
// exists, update
|
||||||
acc[country.name].count = acc[country.name].count + 1;
|
acc[country.name].count += acc[country.name].count;
|
||||||
} else {
|
} else {
|
||||||
acc[country.name] = {
|
acc[country.name] = {
|
||||||
...country,
|
...country,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue