[ABANDONED] React/Redux front end for the Flexor social network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

56 lines
2.0 KiB

import React, { FC, useEffect } from 'react'
import { useDispatch } from 'react-redux'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faCheckCircle } from '@fortawesome/free-solid-svg-icons'
import { initForm, initField } from 'src/actions/forms'
import { setTitle } from 'src/utils'
import PageHeader from 'src/components/page-header'
import TextField from 'src/components/forms/text-field'
import TextareaField from 'src/components/forms/textarea-field'
const CreateApp: FC = () => {
const dispatch = useDispatch()
useEffect(() => {
setTitle('Create a new App')
dispatch(initForm())
dispatch(initField('name', ''))
dispatch(initField('about', ''))
dispatch(initField('websiteUrl', ''))
dispatch(initField('companyName', ''))
dispatch(initField('version', ''))
}, [])
return (
<div>
<PageHeader title="Create a new App" />
<div className="main-content">
<div className="centered-content">
<TextField name="name" label="Name" />
<br />
<TextareaField name="about" label="About" placeholder="Description of this app" />
<br />
<TextField name="websiteUrl" label="Website" placeholder="Website URL (optional)" />
<br />
<TextField name="companyName" label="Company" placeholder="Your company or organization (optional)" />
<br />
<TextField name="version" label="Version" placeholder="Current Version of the app (ex: 0.0.1beta5)" />
<br />
<button className="button is-success">
<span className="icon is-small">
<FontAwesomeIcon icon={faCheckCircle} />
</span>
<span>Create</span>
</button>
</div>
</div>
</div>
)
}
export default CreateApp