import React from 'react'
import PageCreateModal from './PageCreateModal'
import Crowi from '../../util/Crowi'
import i18n from '../../i18n'

i18n()

const crowi = new Crowi({ user: { name: 'storybook' }, csrfToken: '' }, window)

export default { title: 'Modal/PageCreateModal' }

export const Default = () => <PageCreateModal crowi={crowi} />

import React from 'react'
import PageCreateModal from './PageCreateModal'
import Crowi from '../../util/Crowi'
import i18n from '../../i18n'

i18n()

const crowi = new Crowi({ user: {}, csrfToken: '' }, window)

export default { title: 'Modal/PageCreateModal' }

export const Default = () => <PageCreateModal crowi={crowi} />

--- 
+++ 
@@ -5,7 +5,7 @@
 
 i18n()
 
-const crowi = new Crowi({ user: {}, csrfToken: '' }, window)
+const crowi = new Crowi({ user: { name: 'storybook' }, csrfToken: '' }, window)
 
 export default { title: 'Modal/PageCreateModal' }
 
Add user name to PageCreateModal story
