diff --git a/app/components/projects/CreateProject.jsx b/app/components/projects/CreateProject.jsx
index d778df1..1379278 100644
--- a/app/components/projects/CreateProject.jsx
+++ b/app/components/projects/CreateProject.jsx
@@ -54,6 +54,36 @@ const styles = theme => ({
}
})
+const createJSON = values => {
+ const {
+ title,
+ subtitle,
+ creator,
+ avatar,
+ goal,
+ goalToken,
+ video,
+ isPlaying,
+ description
+ } = values
+
+ const manifest = {
+ title,
+ subtitle,
+ creator,
+ avatar,
+ goal,
+ goalToken,
+ description,
+ media: {
+ isPlaying,
+ url: video,
+ type: 'video'
+ }
+ }
+ return JSON.stringify(manifest)
+}
+
const Title = ({ className }) => (
Create Project
@@ -64,8 +94,22 @@ const Title = ({ className }) => (
const SubmissionSection = ({ classes }) => {
return (
{
+ const manifest = createJSON(values)
+ console.log({manifest})
+
+ }}
>
{({
values,
@@ -87,15 +131,15 @@ const SubmissionSection = ({ classes }) => {
input: classes.textInput
}
}}
- id="projectName"
- name="projectName"
+ id="title"
+ name="title"
label="Enter Project Name"
placeholder="Enter Project Name"
margin="normal"
variant="outlined"
onChange={handleChange}
onBlur={handleBlur}
- value={values.projectName || ''}
+ value={values.title || ''}
/>
{
input: classes.textInput
}
}}
- id="subTitle"
- name="subTitle"
+ id="subtitle"
+ name="subtitle"
label="Enter a sub heading description for your project"
placeholder="Enter a sub heading description for your project"
margin="normal"
variant="outlined"
onChange={handleChange}
onBlur={handleBlur}
- value={values.subTitle || ''}
+ value={values.subtitle || ''}
/>
{
className={classes.formControl}
control={
}
label="Autoplay video?"
@@ -224,7 +268,7 @@ const SubmissionSection = ({ classes }) => {
onBlur={handleBlur}
value={values.description || ''}
/>
-
+
)
}