@@ -2,34 +2,23 @@ import { asMonth, quoteTitle } from '../../../utils'
2
2
import Authors from './Authors'
3
3
import PropTypes from 'prop-types'
4
4
5
- const Periodical = ( { entry } ) => {
6
- const title = quoteTitle ( entry . title , [
7
- entry . journal ,
8
- entry . volume ,
9
- entry . number ,
10
- entry . pages ,
11
- entry . month ,
12
- entry . year ,
13
- ] )
14
- const journal = entry . journal ? < i > { entry . journal } , </ i > : ''
15
- const volume = entry . volume ? `vol. ${ entry . volume } , ` : ''
16
- const number = entry . number ? `no. ${ entry . number } , ` : ''
17
- const pages = entry . pages ? `pp. ${ entry . pages } , ` : ''
18
- const month = entry . month ? '' : '' //`${asMonth(entry.month)} ` : ''
19
- const year = entry . year ? entry . year : ''
20
- const stop = entry . journal || entry . volume || entry . number || entry . pages || entry . month || entry . year ? '.' : ''
21
- return (
22
- < >
23
- < Authors > { entry . author } </ Authors > , { title } { journal }
24
- { volume }
25
- { number }
26
- { pages }
27
- { month }
28
- { year }
29
- { stop }
30
- </ >
31
- )
32
- }
5
+ const Periodical = ( { entry } ) => (
6
+ < >
7
+ < Authors > { entry . author } </ Authors > ,{ ' ' }
8
+ { quoteTitle ( entry . title , [ entry . journal , entry . volume , entry . number , entry . pages , entry . month , entry . year ] ) } { ' ' }
9
+ { entry . journal && (
10
+ < >
11
+ < i > { entry . journal } </ i > ,{ ' ' }
12
+ </ >
13
+ ) }
14
+ { entry . volume && < > vol. { entry . volume } , </ > }
15
+ { entry . number && < > no. { entry . number } , </ > }
16
+ { entry . pages && < > pp. { entry . pages } , </ > }
17
+ { entry . month && < > { asMonth ( entry . month ) } </ > }
18
+ { entry . year && < > { entry . year } </ > }
19
+ { ( entry . journal || entry . volume || entry . number || entry . pages || entry . month || entry . year ) && < > .</ > }
20
+ </ >
21
+ )
33
22
34
23
Periodical . propTypes = {
35
24
entry : PropTypes . shape ( {
0 commit comments