

import React from 'react';
import Layout from '../../components/Layout';
import Page from '../../components/Page';
import privacy from './privacy.md';
import isLoggedIn from '../../core/authorization';

function action({ store }) {
  const user = store && store.getState().user;

  return {
    chunks: ['privacy'],
    title: privacy.title,
    component: (
      <Layout isLoggedIn={isLoggedIn(user)}>
        <Page {...privacy} />
      </Layout>
    ),
  };
}

export default action;
