0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00
ghost/apps/sodo-search/src/AppContext.js
Cathy Sarisky 6e599ef541
🌐 Added ⬅️RTL to sodo-search & improved tests (#21152)
no ref

- added dir prop, calculated by i18next from language (using the dir
function)
- tweaked a few styles to use me/ms/pe/ps instead of mr/ml/pr/pl
- added updated test that checks that stemming works in English, and added tests for partial and full-word searching with RTL content.
2024-10-01 18:04:54 +00:00

21 lines
447 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: '',
t: () => {},
dir: 'ltr'
});
export default AppContext;