add login and google survey components
This commit is contained in:
parent
f2ec466e2d
commit
07327def33
4 changed files with 100 additions and 3 deletions
14
client/src/components/GoogleSurvey/GoogleSurvey.js
Normal file
14
client/src/components/GoogleSurvey/GoogleSurvey.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
import React, { Component } from 'react';
|
||||
|
||||
class GoogleSurvey extends Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<iframe title='quarantale survey' src="https://docs.google.com/forms/d/e/1FAIpQLSeVYlLJL_3qyolGk-pKe_vrW_bpNCvQCf7f7MGAH2gUPlMSgA/viewform?embedded=true" width="640" height="511" frameborder="0" marginheight="0" marginwidth="0">Loading…</iframe>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
};
|
||||
|
||||
export default GoogleSurvey;
|
77
client/src/components/Login/Login.js
Normal file
77
client/src/components/Login/Login.js
Normal file
|
@ -0,0 +1,77 @@
|
|||
import React, { Component } from 'react';
|
||||
import { Form, Input, Button } from 'antd';
|
||||
|
||||
const layout = {
|
||||
labelCol: {
|
||||
span: 8,
|
||||
},
|
||||
wrapperCol: {
|
||||
span: 16,
|
||||
},
|
||||
};
|
||||
const tailLayout = {
|
||||
wrapperCol: {
|
||||
offset: 8,
|
||||
span: 16,
|
||||
},
|
||||
};
|
||||
|
||||
class Login extends Component {
|
||||
|
||||
onFinish = values => {
|
||||
console.log('Success:', values);
|
||||
};
|
||||
|
||||
onFinishFailed = errorInfo => {
|
||||
console.log('Failed:', errorInfo);
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Form
|
||||
{...layout}
|
||||
name="basic"
|
||||
initialValues={{
|
||||
remember: true,
|
||||
}}
|
||||
onFinish={this.onFinish}
|
||||
onFinishFailed={this.onFinishFailed}
|
||||
>
|
||||
<Form.Item
|
||||
label="Username"
|
||||
name="username"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: 'Please input your username!',
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label="Password"
|
||||
name="password"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: 'Please input your password!',
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input.Password />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item {...tailLayout}>
|
||||
<Button type="primary" htmlType="submit">
|
||||
Submit
|
||||
</Button>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
)
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
export default Login;
|
|
@ -1,7 +1,11 @@
|
|||
import AppHeader from './AppHeader/AppHeader';
|
||||
import GoogleSurvey from './GoogleSurvey/GoogleSurvey';
|
||||
import Login from './Login/Login';
|
||||
import QuestionList from './QuestionList/QuestionList';
|
||||
|
||||
export {
|
||||
AppHeader,
|
||||
GoogleSurvey,
|
||||
Login,
|
||||
QuestionList
|
||||
};
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
import React, { Component } from 'react';
|
||||
//import { QuestionList } from '../../components/QuestionList';
|
||||
import { GoogleSurvey, QuestionList, Login } from '../../components'
|
||||
|
||||
class DashboardPage extends Component {
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
QuestionList
|
||||
</div>
|
||||
<div><GoogleSurvey /></div>
|
||||
<div><QuestionList /></div>
|
||||
<div><Login /></div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue