Fixed linting

This commit is contained in:
Evan Bacon
2019-11-05 13:22:06 -08:00
parent 1e087d6cc1
commit 827aa33197
6 changed files with 39 additions and 41 deletions

View File

@@ -49,4 +49,4 @@ Using Gatsby with Expo will enable you to [prerender](https://www.netlify.com/bl
### 👀 More Info
- Related: [Expo support PR](https://github.com/slorber/gatsby-plugin-react-native-web/pull/14)
- Related: [Expo support PR](https://github.com/slorber/gatsby-plugin-react-native-web/pull/14)

View File

@@ -1,42 +1,41 @@
import { Link } from "gatsby"
import PropTypes from "prop-types"
import React from "react"
import { View, Text } from 'react-native';
import { Link } from 'gatsby';
import PropTypes from 'prop-types';
import React from 'react';
import { Text, View } from 'react-native';
import { useREM } from 'react-native-web-hooks';
const Header = ({ siteTitle }) => {
const accessibilityRole: any = 'banner'
return (
<View
accessibilityRole={accessibilityRole}
style={{
backgroundColor: `rebeccapurple`,
marginBottom: useREM(1.45),
}}
>
const accessibilityRole: any = 'banner'
return (
<View
accessibilityRole={accessibilityRole}
style={{
maxWidth: 960,
paddingVertical: useREM(1.45),
paddingHorizontal: useREM(1.0875),
backgroundColor: `rebeccapurple`,
marginBottom: useREM(1.45),
}}
>
<Text accessibilityRole="header" style={{ fontWeight: 'bold', fontSize: useREM(2.25) }}>
<Link
to="/"
style={{
color: `white`,
textDecoration: `none`,
}}
>
{siteTitle}
</Link>
</Text>
<View
style={{
maxWidth: 960,
paddingVertical: useREM(1.45),
paddingHorizontal: useREM(1.0875),
}}
>
<Text accessibilityRole="header" style={{ fontWeight: 'bold', fontSize: useREM(2.25) }}>
<Link
to="/"
style={{
color: `white`,
textDecoration: `none`,
}}
>
{siteTitle}
</Link>
</Text>
</View>
</View>
</View>
)
)
}
Header.propTypes = {
siteTitle: PropTypes.string,

View File

@@ -12,7 +12,7 @@ import { Text, View } from 'react-native';
import Header from './header';
const Anchor = (props: any) => {
return <Text accessibilityRole="link" {...props}/>
return <Text accessibilityRole="link" {...props} />
}
const Layout = ({ children }) => {
@@ -42,7 +42,7 @@ const Layout = ({ children }) => {
<Text>
© {new Date().getFullYear()}, Built with
{` `}
<Anchor href="https://www.gatsbyjs.org">Gatsby</Anchor>
<Anchor href="https://www.gatsbyjs.org">Gatsby</Anchor>
</Text>
</View>
</>

View File

@@ -4,11 +4,11 @@
*
* See: https://www.gatsbyjs.org/docs/use-static-query/
*/
import { graphql, useStaticQuery } from 'gatsby';
import PropTypes from 'prop-types';
import React from 'react';
import Helmet from 'react-helmet';
import React from "react"
import PropTypes from "prop-types"
import Helmet from "react-helmet"
import { useStaticQuery, graphql } from "gatsby"
function SEO({ description, lang, meta, title }) {
const { site } = useStaticQuery(

View File

@@ -1,9 +1,9 @@
import React from 'react';
import { Text } from 'react-native';
import { useREM } from 'react-native-web-hooks';
import Layout from '../components/layout';
import SEO from '../components/seo';
import { useREM } from 'react-native-web-hooks';
const NotFoundPage = () => (
<Layout>

View File

@@ -21,7 +21,7 @@ const IndexPage = () => {
const styles = StyleSheet.create({
header: {
fontWeight: 'bold',
fontWeight: 'bold',
marginBottom: 24,
},
paragraph: {
@@ -30,5 +30,4 @@ const styles = StyleSheet.create({
}
})
export default IndexPage