Ghost/apps/sodo-search/src/AppContext.js
Daniel Lockyer c97cc08455 Updated ESLint config for React+Typescript packages
refs https://github.com/TryGhost/DevOps/issues/50

- `react-app` comes from `eslint-config-react-app`, which is a CRA package
- we're moving away from that so this commit switches the linting over
  to a more recently updated plugin
- once that was removed, we started using a newer version of
  `@typescript-eslint/eslint-plugin`, so there were plenty of
  updates/exemptions to make
2023-07-27 11:40:31 +02:00

20 lines
413 B
JavaScript

// Ref: https://reactjs.org/docs/context.html
import React from 'react';
const AppContext = React.createContext({
posts: [],
authors: [],
tags: [],
action: '',
lastPage: '',
page: '',
pageData: {},
// eslint-disable-next-line no-unused-vars
dispatch: (_action, _data) => {},
searchIndex: null,
indexComplete: false,
searchValue: ''
});
export default AppContext;