-
Notifications
You must be signed in to change notification settings - Fork 617
Expand file tree
/
Copy pathindex.js
More file actions
49 lines (41 loc) · 1.44 KB
/
index.js
File metadata and controls
49 lines (41 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import React, { Component } from 'react';
import i18n from '../../i18n';
// HOC
import withRedux from '../../hoc/with_redux';
// Components
import View from '../../components/default_view';
import { TextInput } from '../../inputs';
const SeoForm = ({ page, errors, updatePageSetting, moreSettingPath, ...props }) => {
return (
<View>
<div className="editor-page-settings">
<TextInput
label={i18n.t('views.seo.title_label')}
getValue={() => page.seo_title || ''}
handleChange={value => updatePageSetting('seo_title', value)}
/>
<TextInput
label={i18n.t('views.seo.meta_keywords_label')}
getValue={() => page.meta_keywords || ''}
handleChange={value => updatePageSetting('meta_keywords', value)}
error={errors.slug}
/>
<TextInput
label={i18n.t('views.seo.meta_description_label')}
getValue={() => page.meta_description || ''}
handleChange={value => updatePageSetting('meta_description', value)}
/>
<TextInput
label={i18n.t('views.seo.meta_robots_label')}
getValue={() => page.meta_robots || ''}
handleChange={value => updatePageSetting('meta_robots', value)}
/>
</div>
</View>
)
}
export default withRedux(state => ({
page: state.content.page,
errors: state.editor.formErrors.page || {},
moreSettingPath: state.editor.urls.settings
}))(SeoForm);