Skip to content

Commit

Permalink
chore: update init files to comply with eslintReact style rules #751
Browse files Browse the repository at this point in the history
  • Loading branch information
tomzemp authored Sep 30, 2022
2 parents 7901cdd + 904a087 commit a91dc6e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cli/config/init.App.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CustomDataProvider } from '@dhis2/app-runtime'
import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'
import App from './App.js'

it('renders without crashing', () => {
const div = document.createElement('div')
Expand Down
10 changes: 7 additions & 3 deletions cli/config/init.entrypoint.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import { DataQuery } from '@dhis2/app-runtime'
import i18n from '@dhis2/d2-i18n'
import React from 'react'
import classes from './App.module.css'

const query = {
Expand All @@ -13,8 +13,12 @@ const MyApp = () => (
<div className={classes.container}>
<DataQuery query={query}>
{({ error, loading, data }) => {
if (error) return <span>ERROR</span>
if (loading) return <span>...</span>
if (error) {
return <span>ERROR</span>
}
if (loading) {
return <span>...</span>
}
return (
<>
<h1>
Expand Down

0 comments on commit a91dc6e

Please sign in to comment.