src/app/pages/utils/applyBasicPageHandlers.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import pipe from 'ramda/src/pipe';
import withContexts from '#containers/PageHandlers/withContexts';
import withPageWrapper from '#containers/PageHandlers/withPageWrapper';
import withError from '#containers/PageHandlers/withError';
import withData from '#containers/PageHandlers/withData';
import withHashChangeHandler from '#containers/PageHandlers/withHashChangeHandler';

export default (
  component,
  { handlerBeforeContexts = Component => Component } = {},
) =>
  pipe(
    withData,
    withError,
    withPageWrapper,
    handlerBeforeContexts,
    withContexts,
    withHashChangeHandler,
  )(component);