0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Refactored App into a class component

refs https://github.com/TryGhost/Team/issues/1665

- We need to hook into react element lifecycle events to initialize the search incdex (powered by elasticlunr).
This commit is contained in:
Naz 2022-07-04 17:35:18 +02:00
parent fa26b56c17
commit 686e53bc88

View file

@ -3,16 +3,16 @@ import './App.css';
import AppContext from './AppContext';
import PopupModal from './components/PopupModal';
function App() {
return (
<AppContext.Provider value={{
page: 'search',
showPopup: true,
onAction: () => {}
}}>
<PopupModal />
</AppContext.Provider>
);
export default class App extends React.Component {
render() {
return (
<AppContext.Provider value={{
page: 'search',
showPopup: true,
onAction: () => {}
}}>
<PopupModal />
</AppContext.Provider>
);
}
}
export default App;