Fix ESLint import/no-anonymous-default-export

This commit is contained in:
Marcus Blättermann 2022-11-21 12:34:29 +01:00
parent 579e6fcf10
commit cf460065bf
No known key found for this signature in database
GPG Key ID: A1E1F04008AC450D
4 changed files with 12 additions and 4 deletions

View File

@ -16,12 +16,14 @@ import classes from '../styles/code.module.sass'
const WRAP_THRESHOLD = 30
const CLI_GROUPS = ['init', 'debug', 'project', 'ray', 'huggingface-hub']
export default props => (
const CodeBlock = props => (
<Pre>
<Code {...props} />
</Pre>
)
export default CodeBlock
export const Pre = props => {
return <pre className={classes.pre}>{props.children}</pre>
}

View File

@ -6,7 +6,7 @@ import Template from '../templates/index'
import { LandingHeader, LandingTitle } from '../components/landing'
import Button from '../components/button'
export default ({ data, location }) => {
const page404 = ({ data, location }) => {
const { nightly, legacy } = data.site.siteMetadata
const pageContext = { title: '404 Error', searchExclude: true, isIndex: false }
return (
@ -26,6 +26,8 @@ export default ({ data, location }) => {
)
}
export default page404
export const pageQuery = graphql`
query {
site {

View File

@ -3,7 +3,7 @@ import { graphql, StaticQuery } from 'gatsby'
import { Ul, Li } from '../components/list'
export default () => (
const Features = () => (
<StaticQuery
query={query}
render={({ site }) => {
@ -57,6 +57,8 @@ export default () => (
/>
)
export default Features
const query = graphql`
query FeaturesQuery {
site {

View File

@ -300,10 +300,12 @@ Landing.propTypes = {
}),
}
export default () => (
const PageLanding = () => (
<StaticQuery query={landingQuery} render={({ site }) => <Landing data={site.siteMetadata} />} />
)
export default PageLanding
const landingQuery = graphql`
query LandingQuery {
site {