chore(xo-web): PascalCase NotFound component (#4567)

https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md
This commit is contained in:
Pierre Donias
2019-10-01 17:21:00 +02:00
committed by GitHub
parent 5d971433a5
commit 7c6946931b

View File

@@ -252,7 +252,7 @@ export const parseSize = size => {
// -------------------------------------------------------------------
const _NotFound = () => <h1>{_('errorPageNotFound')}</h1>
const NotFound = () => <h1>{_('errorPageNotFound')}</h1>
// Decorator to declare routes on a component.
//
@@ -286,7 +286,7 @@ export const routes = (indexRoute, childRoutes) => target => {
}
if (childRoutes) {
childRoutes.push({ component: _NotFound, path: '*' })
childRoutes.push({ component: NotFound, path: '*' })
}
target.route = {
@@ -629,7 +629,7 @@ export const adminOnly = Component =>
connectStore({
_isAdmin: isAdmin,
})(({ _isAdmin, ...props }) =>
_isAdmin ? <Component {...props} /> : <_NotFound />
_isAdmin ? <Component {...props} /> : <NotFound />
)
// ===================================================================