ywana-core8 0.0.193 → 0.0.194

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.193",
3
+ "version": "0.0.194",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -10,12 +10,13 @@ import { TYPES } from './ContentType'
10
10
  */
11
11
  export const ContentViewer = (props) => {
12
12
 
13
- const { content, field } = props
13
+ const { content } = props
14
14
 
15
15
  if (!content) return <div>No Content...</div>
16
16
 
17
17
  const sections = content.sections()
18
-
18
+ const value = content.value()
19
+ console.log(value)
19
20
  return (
20
21
  <div className="content-viewer">
21
22
  {sections.map(section => {
@@ -26,7 +27,7 @@ export const ContentViewer = (props) => {
26
27
  {title}
27
28
  </header>
28
29
  <main>
29
- { fields.map( field => <FieldViewer key={field.id} field={field} value={content[field.id]} />)}
30
+ { fields.map( field => <FieldViewer key={field.id} field={field} value={value[field.id]} />)}
30
31
  </main>
31
32
  </section>
32
33
  )
@@ -41,7 +42,7 @@ const FieldViewer = (props) => {
41
42
  const { id, type, item, label } = field
42
43
 
43
44
  console.log('FieldViewer', field, value)
44
-
45
+
45
46
  switch(type) {
46
47
  case TYPES.STRING:
47
48
  return <Property label={label} value={value} />