Skip to content

Commit b9b1b61

Browse files
committed
migration
1 parent 56937e4 commit b9b1b61

2 files changed

Lines changed: 83 additions & 85 deletions

File tree

front/src/pages/login/Login.tsx

Lines changed: 82 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { appConfig } from '../../config/appConfig';
88
import { getLocationOrigin } from '../../services/API/fetchTools';
99
import userInfoMock from '../../mock/userInfo.json';
1010
import { AuthContextProps } from '../../contexts/auth/consumerHOC';
11+
import FadeInEntrance from '../../components/fadeInEntrance';
1112

1213
// #region types
1314
type Props = {} & RouteComponentProps & AuthContextProps;
@@ -35,86 +36,88 @@ class Login extends PureComponent<Props, State> {
3536
const { email, password, isLogging } = this.state;
3637

3738
return (
38-
<div className="content">
39-
<Row>
40-
<Col md={{ size: 4, offset: 4 }} xs={{ size: 10, offset: 1 }}>
41-
<form className="form-horizontal" noValidate>
42-
<fieldset>
43-
<legend>Login</legend>
44-
45-
<div className="form-group">
46-
<label
47-
htmlFor="inputEmail"
48-
className="col-lg-2 control-label"
49-
>
50-
Email
51-
</label>
52-
<Col lg={12}>
53-
<input
54-
type="text"
55-
className="form-control"
56-
id="inputEmail"
57-
placeholder="Email"
58-
autoComplete="username email"
59-
value={email}
60-
onChange={this.handlesOnEmailChange}
61-
/>
62-
</Col>
63-
</div>
64-
65-
<div className="form-group">
66-
<label
67-
htmlFor="inputPassword"
68-
className="col-lg-2 control-label"
69-
>
70-
Password
71-
</label>
72-
<Col lg={12}>
73-
<input
74-
type="password"
75-
className="form-control"
76-
id="inputPassword"
77-
placeholder="Password"
78-
autoComplete="current-password"
79-
value={password}
80-
onChange={this.handlesOnPasswordChange}
81-
/>
82-
</Col>
83-
</div>
84-
85-
<div className="form-group">
86-
<Col lg={{ size: 12 }}>
87-
<Button
88-
className="login-button btn-block"
89-
color="primary"
90-
disabled={isLogging}
91-
onClick={this.handlesOnLogin}
39+
<FadeInEntrance>
40+
<div className="content">
41+
<Row>
42+
<Col md={{ size: 4, offset: 4 }} xs={{ size: 10, offset: 1 }}>
43+
<form className="form-horizontal" noValidate>
44+
<fieldset>
45+
<legend>Login</legend>
46+
47+
<div className="form-group">
48+
<label
49+
htmlFor="inputEmail"
50+
className="col-lg-2 control-label"
9251
>
93-
{isLogging ? (
94-
<span>
95-
login in... &nbsp;
96-
<i className="fa fa-spinner fa-pulse fa-fw" />
97-
</span>
98-
) : (
99-
<span>Login</span>
100-
)}
101-
</Button>
102-
</Col>
103-
</div>
104-
</fieldset>
105-
</form>
106-
</Col>
107-
</Row>
108-
<Row>
109-
<Col md={{ size: 4, offset: 4 }} xs={{ size: 10, offset: 1 }}>
110-
<div className="pull-right">
111-
<Button className="btn-block" onClick={this.goHome}>
112-
back to home
113-
</Button>
114-
</div>
115-
</Col>
116-
</Row>
117-
</div>
52+
Email
53+
</label>
54+
<Col lg={12}>
55+
<input
56+
type="text"
57+
className="form-control"
58+
id="inputEmail"
59+
placeholder="Email"
60+
autoComplete="username email"
61+
value={email}
62+
onChange={this.handlesOnEmailChange}
63+
/>
64+
</Col>
65+
</div>
66+
67+
<div className="form-group">
68+
<label
69+
htmlFor="inputPassword"
70+
className="col-lg-2 control-label"
71+
>
72+
Password
73+
</label>
74+
<Col lg={12}>
75+
<input
76+
type="password"
77+
className="form-control"
78+
id="inputPassword"
79+
placeholder="Password"
80+
autoComplete="current-password"
81+
value={password}
82+
onChange={this.handlesOnPasswordChange}
83+
/>
84+
</Col>
85+
</div>
86+
87+
<div className="form-group">
88+
<Col lg={{ size: 12 }}>
89+
<Button
90+
className="login-button btn-block"
91+
color="primary"
92+
disabled={isLogging}
93+
onClick={this.handlesOnLogin}
94+
>
95+
{isLogging ? (
96+
<span>
97+
login in... &nbsp;
98+
<i className="fa fa-spinner fa-pulse fa-fw" />
99+
</span>
100+
) : (
101+
<span>Login</span>
102+
)}
103+
</Button>
104+
</Col>
105+
</div>
106+
</fieldset>
107+
</form>
108+
</Col>
109+
</Row>
110+
<Row>
111+
<Col md={{ size: 4, offset: 4 }} xs={{ size: 10, offset: 1 }}>
112+
<div className="pull-right">
113+
<Button className="btn-block" onClick={this.goHome}>
114+
back to home
115+
</Button>
116+
</div>
117+
</Col>
118+
</Row>
119+
</div>
120+
</FadeInEntrance>
118121
);
119122
}
120123
// #endregion

front/src/pages/login/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
import { compose } from 'redux';
22
import Login from './Login';
3-
import withEnterAnimation from '../../hoc/withEnterAnimation';
43
import withAuth from '../../contexts/auth/consumerHOC';
5-
s;
64

7-
export default compose(
8-
withEnterAnimation(/* no option yet */),
9-
withAuth(),
10-
)(Login);
5+
export default compose(withAuth())(Login);

0 commit comments

Comments
 (0)