Skip to content

Commit a5ec916

Browse files
committed
small Eslint edits related to #183
1 parent e89d253 commit a5ec916

File tree

3 files changed

+15
-33
lines changed

3 files changed

+15
-33
lines changed

book/8-end/pages/public/login.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { withRouter } from 'next/router';
33
import PropTypes from 'prop-types';
44
import Button from '@material-ui/core/Button';
55

6-
76
import withAuth from '../../lib/withAuth';
87
import withLayout from '../../lib/withLayout';
98
import { styleLoginButton } from '../../components/SharedStyles';
@@ -14,18 +13,12 @@ function Login({ router }) {
1413
return (
1514
<div style={{ textAlign: 'center', margin: '0 20px' }}>
1615
<Head>
17-
<title>
18-
Log in to Builder Book
19-
</title>
16+
<title>Log in to Builder Book</title>
2017
<meta name="description" content="Login page for builderbook.org" />
2118
</Head>
2219
<br />
23-
<p style={{ margin: '45px auto', fontSize: '44px', fontWeight: '400' }}>
24-
Log in
25-
</p>
26-
<p>
27-
You’ll be logged in for 14 days unless you log out manually.
28-
</p>
20+
<p style={{ margin: '45px auto', fontSize: '44px', fontWeight: '400' }}>Log in</p>
21+
<p>You’ll be logged in for 14 days unless you log out manually.</p>
2922
<br />
3023
<Button
3124
variant="contained"

book/8-end/pages/public/read-chapter.js

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,7 @@ class ReadChapter extends React.Component {
167167
renderMainContent() {
168168
const { user, showStripeModal } = this.props;
169169

170-
const {
171-
chapter, htmlContent, showTOC, isMobile,
172-
} = this.state;
170+
const { chapter, htmlContent, showTOC, isMobile } = this.state;
173171

174172
const { book } = chapter;
175173

@@ -207,7 +205,7 @@ class ReadChapter extends React.Component {
207205

208206
return (
209207
<ul>
210-
{sections.map(s => (
208+
{sections.map((s) => (
211209
<li key={s.escapedText} style={{ paddingTop: '10px' }}>
212210
<a
213211
style={{
@@ -225,9 +223,7 @@ class ReadChapter extends React.Component {
225223
}
226224

227225
renderSidebar() {
228-
const {
229-
showTOC, chapter, isMobile, hideHeader,
230-
} = this.state;
226+
const { showTOC, chapter, isMobile, hideHeader } = this.state;
231227

232228
if (!showTOC) {
233229
return null;
@@ -282,9 +278,7 @@ class ReadChapter extends React.Component {
282278
render() {
283279
const { user, router } = this.props;
284280

285-
const {
286-
chapter, showTOC, hideHeader, isMobile,
287-
} = this.state;
281+
const { chapter, showTOC, hideHeader, isMobile } = this.state;
288282

289283
if (!chapter) {
290284
return <Error statusCode={404} />;
@@ -346,11 +340,13 @@ class ReadChapter extends React.Component {
346340
role="button"
347341
>
348342
format_list_bulleted
349-
</i>
343+
</i>
350344
</div>
351345
</div>
352346
);
353347
}
354348
}
355349

356-
export default withAuth(withLayout(withRouter(ReadChapter), { noHeader: true }), { loginRequired: false });
350+
export default withAuth(withLayout(withRouter(ReadChapter), { noHeader: true }), {
351+
loginRequired: false,
352+
});

book/8-start/pages/public/read-chapter.js

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,7 @@ class ReadChapter extends React.Component {
151151
};
152152

153153
renderMainContent() {
154-
const {
155-
chapter, htmlContent, showTOC, isMobile,
156-
} = this.state;
154+
const { chapter, htmlContent, showTOC, isMobile } = this.state;
157155

158156
let padding = '20px 20%';
159157
if (!isMobile && showTOC) {
@@ -186,7 +184,7 @@ class ReadChapter extends React.Component {
186184

187185
return (
188186
<ul>
189-
{sections.map(s => (
187+
{sections.map((s) => (
190188
<li key={s.escapedText} style={{ paddingTop: '10px' }}>
191189
<a
192190
style={{
@@ -204,9 +202,7 @@ class ReadChapter extends React.Component {
204202
}
205203

206204
renderSidebar() {
207-
const {
208-
showTOC, chapter, isMobile, hideHeader,
209-
} = this.state;
205+
const { showTOC, chapter, isMobile, hideHeader } = this.state;
210206

211207
if (!showTOC) {
212208
return null;
@@ -261,10 +257,7 @@ class ReadChapter extends React.Component {
261257
render() {
262258
const { user } = this.props;
263259

264-
const {
265-
chapter, showTOC, hideHeader, isMobile,
266-
} = this.state;
267-
260+
const { chapter, showTOC, hideHeader, isMobile } = this.state;
268261

269262
if (!chapter) {
270263
return <Error statusCode={404} />;

0 commit comments

Comments
 (0)