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:
@@ -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 />
|
||||
)
|
||||
|
||||
// ===================================================================
|
||||
|
||||
Reference in New Issue
Block a user