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,7 +3,8 @@ import './App.css';
|
||||||
import AppContext from './AppContext';
|
import AppContext from './AppContext';
|
||||||
import PopupModal from './components/PopupModal';
|
import PopupModal from './components/PopupModal';
|
||||||
|
|
||||||
function App() {
|
export default class App extends React.Component {
|
||||||
|
render() {
|
||||||
return (
|
return (
|
||||||
<AppContext.Provider value={{
|
<AppContext.Provider value={{
|
||||||
page: 'search',
|
page: 'search',
|
||||||
|
@ -14,5 +15,4 @@ function App() {
|
||||||
</AppContext.Provider>
|
</AppContext.Provider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
export default App;
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue