add login and google survey components

This commit is contained in:
Markus Schubert 2020-03-13 10:52:44 +01:00
parent f2ec466e2d
commit 07327def33
4 changed files with 100 additions and 3 deletions

View 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;

View 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;

View file

@ -1,7 +1,11 @@
import AppHeader from './AppHeader/AppHeader'; import AppHeader from './AppHeader/AppHeader';
import GoogleSurvey from './GoogleSurvey/GoogleSurvey';
import Login from './Login/Login';
import QuestionList from './QuestionList/QuestionList'; import QuestionList from './QuestionList/QuestionList';
export { export {
AppHeader, AppHeader,
GoogleSurvey,
Login,
QuestionList QuestionList
}; };

View file

@ -1,13 +1,15 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
//import { QuestionList } from '../../components/QuestionList'; import { GoogleSurvey, QuestionList, Login } from '../../components'
class DashboardPage extends Component { class DashboardPage extends Component {
render() { render() {
return ( return (
<div> <div>
QuestionList <div><GoogleSurvey /></div>
</div> <div><QuestionList /></div>
<div><Login /></div>
</div>
) )
} }
} }