Skip to content

Commit 98cd3ff

Browse files
committed
Clean up imports
1 parent c575a07 commit 98cd3ff

File tree

13 files changed

+34
-169
lines changed

13 files changed

+34
-169
lines changed

package-lock.json

Lines changed: 11 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/LoginControls.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
import React, { Fragment } from 'react'
2-
import styled from 'styled-components'
32
import Button from './Button'
43
import { loggedIn, signOut } from '../services/moocfi'
54
import { navigate } from 'gatsby'
65

7-
const LoginControlsContainer = styled.div`
8-
background-color: black;
9-
display: block;
10-
height: 5rem;
11-
width: 100%;
12-
`
13-
146
export default class LoginControls extends React.Component {
157
doSignOut = e => {
168
e.preventDefault()

src/components/user/ConfirmEmail.js

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,7 @@
1-
import React, { Fragment } from 'react'
2-
import Layout from '../layout'
3-
import Banner from '../Banner'
4-
import Sidebar from '../Sidebar'
5-
import ContentArea from '../ContentArea'
6-
import { authenticate } from '../../services/moocfi'
1+
import React from 'react'
72
import { Link } from 'gatsby'
8-
import { loggedIn } from '../../services/moocfi'
9-
import {
10-
TextField,
11-
Button,
12-
FormControlLabel,
13-
Checkbox,
14-
} from '@material-ui/core'
153

164
import styled from 'styled-components'
17-
import CourseOptionsEditor from '../user/CourseOptionsEditor'
18-
19-
const Row = styled.div`
20-
margin-bottom: 1.5rem;
21-
`
22-
23-
const Form = styled.form``
24-
25-
const Label = styled.label``
26-
27-
const Input = styled.input`
28-
width: 100%;
29-
padding: 0.3rem;
30-
`
315

326
const InfoBox = styled.div`
337
margin-bottom: 2rem;

src/components/user/CourseOptionsEditor.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
import React, { Fragment } from 'react'
2-
import Layout from '../layout'
3-
import Banner from '../Banner'
4-
import Sidebar from '../Sidebar'
5-
import ContentArea from '../ContentArea'
6-
import { authenticate } from '../../services/moocfi'
7-
import { navigate } from 'gatsby'
8-
import { loggedIn } from '../../services/moocfi'
1+
import React from 'react'
92
import {
103
TextField,
114
Button,
@@ -21,13 +14,6 @@ const Row = styled.div`
2114

2215
const Form = styled.form``
2316

24-
const Label = styled.label``
25-
26-
const Input = styled.input`
27-
width: 100%;
28-
padding: 0.3rem;
29-
`
30-
3117
const InfoBox = styled.div`
3218
margin-bottom: 2rem;
3319
`

src/components/user/CreateAccountForm.js

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
1-
import React, { Fragment } from 'react'
2-
import Layout from '../layout'
3-
import Banner from '../Banner'
4-
import Sidebar from '../Sidebar'
5-
import ContentArea from '../ContentArea'
6-
import { authenticate } from '../../services/moocfi'
7-
import { navigate, Link } from 'gatsby'
8-
import { loggedIn } from '../../services/moocfi'
9-
import {
10-
TextField,
11-
Button,
12-
FormControlLabel,
13-
Checkbox,
14-
} from '@material-ui/core'
1+
import React from 'react'
2+
import { Link } from 'gatsby'
3+
import { TextField, Button } from '@material-ui/core'
154

165
import styled from 'styled-components'
176

@@ -21,13 +10,6 @@ const Row = styled.div`
2110

2211
const Form = styled.form``
2312

24-
const Label = styled.label``
25-
26-
const Input = styled.input`
27-
width: 100%;
28-
padding: 0.3rem;
29-
`
30-
3113
const InfoBox = styled.div`
3214
margin-bottom: 2rem;
3315
`
@@ -58,7 +40,7 @@ class CreateAccountForm extends React.Component {
5840
<Form>
5941
<InfoBox>
6042
Tämä kurssi käyttää{' '}
61-
<a href="https://mooc.fi" target="_blank" rel="noopener">
43+
<a href="https://mooc.fi" target="_blank" rel="noopener noreferrer">
6244
mooc.fi
6345
</a>{' '}
6446
käyttäjätunnuksia. Jos olet aikaisemmin tehnyt mooc.fi -kursseja
@@ -94,11 +76,12 @@ class CreateAccountForm extends React.Component {
9476
label="Salasana uudestaan"
9577
fullWidth
9678
value={this.state.password}
97-
onChange={o => this.setState({ password_confirmation: o.target.value })}
79+
onChange={o =>
80+
this.setState({ password_confirmation: o.target.value })
81+
}
9882
/>
9983
</Row>
10084

101-
10285
<Row>
10386
<Button
10487
onClick={this.onClick}
@@ -113,7 +96,9 @@ class CreateAccountForm extends React.Component {
11396
</Form>
11497

11598
<Row>
116-
<Link to="/log-in">Onko sinulla jo käyttäjätunnus? Kirjaudu sisään</Link>
99+
<Link to="/log-in">
100+
Onko sinulla jo käyttäjätunnus? Kirjaudu sisään
101+
</Link>
117102
</Row>
118103
{this.state.error && (
119104
<InfoBox>

src/pages/sign-in.js

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, { Fragment } from 'react'
22
import Layout from '../components/layout'
3-
import Banner from '../components/Banner'
43
import Sidebar from '../components/Sidebar'
54
import ContentArea from '../components/ContentArea'
65
import { authenticate } from '../services/moocfi'
@@ -16,13 +15,6 @@ const Row = styled.div`
1615

1716
const Form = styled.form``
1817

19-
const Label = styled.label``
20-
21-
const Input = styled.input`
22-
width: 100%;
23-
padding: 0.3rem;
24-
`
25-
2618
const InfoBox = styled.div`
2719
margin-bottom: 2rem;
2820
`
@@ -37,7 +29,7 @@ class SignInPage extends React.Component {
3729
e.preventDefault()
3830
if (
3931
this.state.submitting ||
40-
(this.state.email.length == 0 && this.state.password.length == 0)
32+
(this.state.email.length === 0 && this.state.password.length === 0)
4133
) {
4234
return
4335
}
@@ -80,7 +72,11 @@ class SignInPage extends React.Component {
8072
<Form>
8173
<InfoBox>
8274
Tämä kurssi käyttää{' '}
83-
<a href="https://mooc.fi" target="_blank" rel="noopener">
75+
<a
76+
href="https://mooc.fi"
77+
target="_blank"
78+
rel="noopener noreferrer"
79+
>
8480
mooc.fi
8581
</a>{' '}
8682
käyttäjätunnuksia. Jos olet aikaisemmin tehnyt mooc.fi
@@ -134,7 +130,7 @@ class SignInPage extends React.Component {
134130
<a
135131
href="https://tmc.mooc.fi/password_reset_keys/new"
136132
target="_blank"
137-
rel="noopener"
133+
rel="noopener noreferrer"
138134
>
139135
Unohdin salasanani
140136
</a>

0 commit comments

Comments
 (0)