[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.
 
 

52 lines
1.1 KiB

import React, { FC, useEffect } from 'react'
import CreateGroupStep from '../../create-group-step'
import CreateUserStep from '../../create-user-step'
interface Step {
title: string
component: FC
}
const steps: Step[] = [
{
title: 'Create a Community',
component: () => <CreateGroupStep />,
},
{
title: 'Create Your Account',
component: () => <CreateUserStep />,
},
]
export interface Props {
step: number
initForm: () => void
}
const Register: FC<Props> = ({ step: index, initForm }) => {
const step = steps[index]
const Component = step.component
useEffect(() => {
initForm()
}, [])
return (
<div>
<section className="hero is-dark is-bold">
<div className="hero-body">
<div className="container">
<h1 className="title">{step.title}</h1>
</div>
</div>
</section>
<div className="main-content">
<Component />
</div>
</div>
)
}
export default Register