fix: Dedupe layout selection logic
This commit is contained in:
@ -5,9 +5,8 @@ import { Provider } from 'react-redux';
|
||||
|
||||
import headComponents from './src/head';
|
||||
import { createStore } from './src/redux/createStore';
|
||||
import { wrapPageElement } from './gatsby-browser';
|
||||
|
||||
export { wrapPageElement };
|
||||
import layoutSelector from './utils/gatsby/layoutSelector';
|
||||
|
||||
const store = createStore();
|
||||
|
||||
@ -19,6 +18,8 @@ wrapRootElement.propTypes = {
|
||||
element: PropTypes.any
|
||||
};
|
||||
|
||||
export const wrapPageElement = layoutSelector;
|
||||
|
||||
export const onRenderBody = ({ setHeadComponents, setPostBodyComponents }) => {
|
||||
setHeadComponents([...headComponents]);
|
||||
setPostBodyComponents(
|
||||
|
Reference in New Issue
Block a user