File tree Expand file tree Collapse file tree 6 files changed +16
-14
lines changed Expand file tree Collapse file tree 6 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 37
37
38
38
<script lang="ts">
39
39
import { Component , Getter , Vue } from ' nuxt-property-decorator'
40
- import { SponsorList , SponsorPlans } from ' ~/types/sponsors'
40
+ import SponsorList from ' ~/types/sponsors'
41
+ import SponsorPlan from ' ~/types/sponsorPlan'
41
42
import BaseSection from ' ~/components/BaseSection.vue'
42
43
43
44
@Component ({
@@ -50,7 +51,7 @@ export default class TheSponsorListSection extends Vue {
50
51
private sponsorsByPlan! : (plan : string ) => SponsorList []
51
52
52
53
@Getter (' sponsorPlansHavingSponsors' , { namespace: ' sponsors' })
53
- private sponsorPlansHavingSponsors! : SponsorPlans []
54
+ private sponsorPlansHavingSponsors! : SponsorPlan []
54
55
}
55
56
</script >
56
57
Original file line number Diff line number Diff line change 79
79
80
80
<script lang="ts">
81
81
import { Component , Getter , Vue } from ' nuxt-property-decorator'
82
- import { SponsorList , SponsorPlans } from ' ~/types/sponsors'
82
+ import SponsorList from ' ~/types/sponsors'
83
+ import SponsorPlan from ' ~/types/sponsorPlan'
83
84
import BaseMain from ' ~/components/BaseMain.vue'
84
85
import BaseButton from ' ~/components/BaseButton.vue'
85
86
@@ -94,7 +95,7 @@ export default class SponsorsPage extends Vue {
94
95
private sponsorsByPlan! : (plan : string ) => SponsorList []
95
96
96
97
@Getter (' sponsorPlansHavingSponsors' , { namespace: ' sponsors' })
97
- private sponsorPlansHavingSponsors! : SponsorPlans []
98
+ private sponsorPlansHavingSponsors! : SponsorPlan []
98
99
99
100
private head() {
100
101
const url = ' https://vuefes.jp/2019/sponsors/'
Original file line number Diff line number Diff line change 1
1
import { Getters , Mutations , Actions } from '~/types/store'
2
- import { SponsorList , SponsorPlans } from '~/types/sponsors'
2
+ import SponsorList from '~/types/sponsors'
3
+ import SponsorPlan from '~/types/sponsorPlan'
3
4
import { getSponsors } from '~/plugins/contentful'
4
5
5
6
namespace Sponsors {
6
7
export type State = {
7
8
sponsors : SponsorList [ ]
8
- sponsorPlans : SponsorPlans [ ]
9
+ sponsorPlans : SponsorPlan [ ]
9
10
}
10
11
11
12
export type Getters = {
12
13
sponsorsByPlan : ( plan : string ) => SponsorList [ ]
13
- sponsorPlansHavingSponsors : SponsorPlans [ ]
14
+ sponsorPlansHavingSponsors : SponsorPlan [ ]
14
15
}
15
16
16
17
export type Mutations = {
Original file line number Diff line number Diff line change
1
+ export default interface SponsorPlan {
2
+ plan : string
3
+ name : string
4
+ }
Original file line number Diff line number Diff line change @@ -11,8 +11,3 @@ export default interface Sponsor {
11
11
appliedAt : string
12
12
}
13
13
}
14
-
15
- export interface SponsorPlans {
16
- plan : string
17
- name : string
18
- }
Original file line number Diff line number Diff line change 1
1
import sponsorList from '../../../fixtures/contentful/sponsors'
2
2
import * as contentful from '~/plugins/contentful'
3
- import { SponsorPlans } from '~/types/sponsors '
3
+ import SponsorPlan from '~/types/sponsorPlan '
4
4
import {
5
5
state as initialState ,
6
6
getters ,
@@ -22,7 +22,7 @@ describe('sponsors module', () => {
22
22
} )
23
23
24
24
test ( 'plan と一致するスポンサー情報のみ取得できる' , ( ) => {
25
- const platinumSponsor : SponsorPlans = sponsorList [ 2 ]
25
+ const platinumSponsor : SponsorPlan = sponsorList [ 2 ]
26
26
expect ( getters . sponsorsByPlan ( state ) ( 'platinum' ) [ 0 ] ) . toEqual (
27
27
platinumSponsor
28
28
)
You can’t perform that action at this time.
0 commit comments