import React from 'react' import '../src/globalStyles.css' import data from '../src/data.json' import Home from '../src/views/Home' import About from '../src/views/About' import SinglePost from '../src/views/SinglePost' import Contact from '../src/views/Contact' const CMS = window.CMS CMS.registerPreviewStyle( 'https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.css' ) CMS.registerPreviewStyle('/admin/cms.bundle.css') const getDocument = (collection, name) => data[collection] && data[collection].filter(page => page.name === name)[0] const globalSettings = getDocument('settings', 'global') // Preview Templates CMS.registerPreviewTemplate('home-page', ({ entry }) => ( )) CMS.registerPreviewTemplate('about-page', ({ entry }) => ( )) CMS.registerPreviewTemplate('contact-page', ({ entry }) => ( )) CMS.registerPreviewTemplate('posts', ({ entry }) => ( )) window.netlifyIdentity.on('logout', function () { document.location.href = '/' })