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:
parent
fa26b56c17
commit
686e53bc88
1 changed files with 12 additions and 12 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue