File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 3
3
</template >
4
4
5
5
<script >
6
- import moment from ' moment '
6
+ import { formatDate } from ' ~/utils/article '
7
7
8
8
export default {
9
9
props: {
@@ -14,9 +14,7 @@ export default {
14
14
},
15
15
computed: {
16
16
formettedPublishedAt () {
17
- return moment (this .publishedAt , ' X' )
18
- .locale (' ja' )
19
- .format (' L' )
17
+ return formatDate (this .publishedAt )
20
18
}
21
19
}
22
20
}
Original file line number Diff line number Diff line change 11
11
12
12
<script >
13
13
import { BigNumber } from ' bignumber.js'
14
- import moment from ' moment '
14
+ import { formatDate } from ' ~/utils/article '
15
15
16
16
export default {
17
17
props: {
@@ -26,9 +26,7 @@ export default {
26
26
},
27
27
computed: {
28
28
formettedPublishedAt () {
29
- return moment (this .publishedAt , ' X' )
30
- .locale (' ja' )
31
- .format (' L' )
29
+ return formatDate (this .publishedAt )
32
30
},
33
31
formattedTokenAmount () {
34
32
if (this .tokenAmount === undefined ) return
Original file line number Diff line number Diff line change 1
1
/* eslint-disable no-undef */
2
+ import moment from 'moment'
2
3
3
4
export function getThumbnails ( images ) {
4
5
return images
@@ -33,3 +34,9 @@ export function showEmbedTweet({ $axios }) {
33
34
iframely . load ( )
34
35
} )
35
36
}
37
+
38
+ export function formatDate ( date ) {
39
+ return moment ( date , 'X' )
40
+ . locale ( 'ja' )
41
+ . format ( 'L' )
42
+ }
You can’t perform that action at this time.
0 commit comments