Skip to content

Commit f2e6714

Browse files
committed
refactor: apply prettier to layout
1 parent dd0c112 commit f2e6714

File tree

8 files changed

+168
-197
lines changed

8 files changed

+168
-197
lines changed

src/layout/Footer.js

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,10 @@ class Footer extends Component {
9595
<Link to="/project/contribute/">How to contribute</Link>
9696
</li>
9797
<li>
98-
<a
99-
href="https://github.com/adaltas/node-csv"
100-
>
101-
GitHub
102-
</a>
98+
<a href="https://github.com/adaltas/node-csv">GitHub</a>
10399
</li>
104100
<li>
105-
<a
106-
href="https://github.com/adaltas/node-csv/issues"
107-
>
101+
<a href="https://github.com/adaltas/node-csv/issues">
108102
Issue Tracker
109103
</a>
110104
</li>
@@ -117,14 +111,8 @@ class Footer extends Component {
117111
<h1>About</h1>
118112
<p>
119113
The Node.js CSV project is an open source product hosted on{' '}
120-
<a href="https://www.github.com">
121-
GitHub
122-
</a>{' '}
123-
and developed by{' '}
124-
<a href="https://www.adaltas.com">
125-
Adaltas
126-
</a>
127-
.
114+
<a href="https://www.github.com">GitHub</a> and developed by{' '}
115+
<a href="https://www.adaltas.com">Adaltas</a>.
128116
</p>
129117
</div>
130118
</div>

src/layout/Header.js

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,7 @@ const styles = {
116116
},
117117
}
118118

119-
export default function Header({
120-
children,
121-
onMenuClick,
122-
page,
123-
project,
124-
}) {
119+
export default function Header({ children, onMenuClick, page, project }) {
125120
return (
126121
<>
127122
<div css={styles.headerContainer}>
@@ -149,11 +144,7 @@ export default function Header({
149144
</Link>
150145
</h1>
151146
<div css={styles.grow} />
152-
<a
153-
href={project.issue}
154-
css={styles.quick}
155-
id="tooltip-issue"
156-
>
147+
<a href={project.issue} css={styles.quick} id="tooltip-issue">
157148
<Icon
158149
color="inherit"
159150
aria-labelledby="header-bug"
@@ -162,13 +153,11 @@ export default function Header({
162153
>
163154
<FaBug css={styles.icon} />
164155
</Icon>
165-
<span id="header-bug" css={styles.quick_label}>Issues</span>
156+
<span id="header-bug" css={styles.quick_label}>
157+
Issues
158+
</span>
166159
</a>
167-
<a
168-
href={project.github}
169-
css={styles.quick}
170-
id="tooltip-git"
171-
>
160+
<a href={project.github} css={styles.quick} id="tooltip-git">
172161
<Icon
173162
color="inherit"
174163
aria-labelledby="header-github"
@@ -177,7 +166,9 @@ export default function Header({
177166
>
178167
<FaGithub css={styles.icon} />
179168
</Icon>
180-
<span id="header-github" css={styles.quick_label}>GitHub</span>
169+
<span id="header-github" css={styles.quick_label}>
170+
GitHub
171+
</span>
181172
</a>
182173
</div>
183174
<Tooltip
@@ -186,22 +177,20 @@ export default function Header({
186177
place="bottom"
187178
effect="solid"
188179
content="Report an issue"
189-
style={{zIndex: 10}}
180+
style={{ zIndex: 10 }}
190181
/>
191182
<Tooltip
192183
anchorId="tooltip-git"
193184
delayShow={300}
194185
place="bottom"
195186
effect="solid"
196187
content="GitHub repository"
197-
style={{zIndex: 10}}
188+
style={{ zIndex: 10 }}
198189
/>
199190
<Tools page={page} />
200191
</header>
201192
</div>
202-
<div css={styles.root}>
203-
{children}
204-
</div>
193+
<div css={styles.root}>{children}</div>
205194
</>
206195
)
207196
}

src/layout/Intro.js

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ const Intro = () => {
9797
href="/generate/"
9898
alt="CSV Generate package"
9999
onMouseEnter={(e) =>
100-
generateRef.current.style['fill-opacity'] = .4
100+
(generateRef.current.style['fill-opacity'] = 0.4)
101101
}
102102
onMouseLeave={(e) =>
103-
generateRef.current.style['fill-opacity'] = .2
103+
(generateRef.current.style['fill-opacity'] = 0.2)
104104
}
105105
>
106106
<g>
@@ -149,7 +149,7 @@ const Intro = () => {
149149
<g transform="matrix(1,0,0,1,516,430.459)">
150150
<text
151151
style={{
152-
fontFamily: "Fira Mono",
152+
fontFamily: 'Fira Mono',
153153
fontWeight: '400',
154154
fontSize: '30px',
155155
fontStyle: 'normal',
@@ -167,10 +167,10 @@ const Intro = () => {
167167
href="/parse/"
168168
alt="CSV Parse package"
169169
onMouseEnter={(e) =>
170-
parseRef.current.style['fill-opacity'] = .4
170+
(parseRef.current.style['fill-opacity'] = 0.4)
171171
}
172172
onMouseLeave={(e) =>
173-
parseRef.current.style['fill-opacity'] = .2
173+
(parseRef.current.style['fill-opacity'] = 0.2)
174174
}
175175
>
176176
<g>
@@ -220,7 +220,7 @@ const Intro = () => {
220220
<text
221221
style={{
222222
textAlign: 'center',
223-
fontFamily: "Fira Mono",
223+
fontFamily: 'Fira Mono',
224224
fontWeight: '400',
225225
fontSize: '30px',
226226
fontStyle: 'normal',
@@ -238,10 +238,10 @@ const Intro = () => {
238238
href="/transform/"
239239
alt="Stream Transform package"
240240
onMouseEnter={(e) =>
241-
transformRef.current.style['fill-opacity'] = .4
241+
(transformRef.current.style['fill-opacity'] = 0.4)
242242
}
243243
onMouseLeave={(e) =>
244-
transformRef.current.style['fill-opacity'] = .2
244+
(transformRef.current.style['fill-opacity'] = 0.2)
245245
}
246246
>
247247
<g>
@@ -290,7 +290,7 @@ const Intro = () => {
290290
<g transform="matrix(1,0,0,1,881,501)">
291291
<text
292292
style={{
293-
fontFamily: "Fira Mono",
293+
fontFamily: 'Fira Mono',
294294
fontWeight: '400',
295295
fontSize: '30px',
296296
fontStyle: 'normal',
@@ -308,10 +308,10 @@ const Intro = () => {
308308
href="/stringify/"
309309
alt="CSV Stringify package"
310310
onMouseEnter={(e) =>
311-
stringifyRef.current.style['fill-opacity'] = .4
311+
(stringifyRef.current.style['fill-opacity'] = 0.4)
312312
}
313313
onMouseLeave={(e) =>
314-
stringifyRef.current.style['fill-opacity'] = .2
314+
(stringifyRef.current.style['fill-opacity'] = 0.2)
315315
}
316316
>
317317
<g>
@@ -360,7 +360,7 @@ const Intro = () => {
360360
<g transform="matrix(1,0,0,1,1083,556.117)">
361361
<text
362362
style={{
363-
fontFamily: "Fira Mono",
363+
fontFamily: 'Fira Mono',
364364
fontWeight: '400',
365365
fontSize: '30px',
366366
fontStyle: 'normal',
@@ -381,9 +381,8 @@ const Intro = () => {
381381
<div css={styles.headline}>
382382
<p>
383383
Comprehensive CSV suite combining 4 well tested packages to{' '}
384-
<Link to="/generate/">generate</Link>,{' '}
385-
<Link to="/parse/">parse</Link>,{' '}
386-
<Link to="/transform/">transform</Link> and{' '}
384+
<Link to="/generate/">generate</Link>, <Link to="/parse/">parse</Link>
385+
, <Link to="/transform/">transform</Link> and{' '}
387386
<Link to="/stringify/">stringify</Link> CSV data.
388387
</p>
389388
</div>

src/layout/Logo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react'
22

3-
const Logo = props => (
3+
const Logo = (props) => (
44
<svg
55
xmlns="http://www.w3.org/2000/svg"
66
style={{ isolation: 'isolate' }}

src/layout/Main.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ class Main extends Component {
2525
boxSizing: 'border-box',
2626
},
2727
clear: 'right',
28-
'& h2:a': {
29-
},
28+
'& h2:a': {},
3029
'& h2:before': {
3130
// display: 'block',
3231
// content: '"ok"',

0 commit comments

Comments
 (0)