Skip to content

Commit 60e9470

Browse files
committed
fix: SponsorList -> Sponsor
1 parent 496e1b0 commit 60e9470

File tree

9 files changed

+15
-15
lines changed

9 files changed

+15
-15
lines changed

src/components/TheSponsorListSection.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
<script lang="ts">
3939
import { Component, Getter, Vue } from 'nuxt-property-decorator'
40-
import SponsorList from '~/types/sponsors'
40+
import Sponsor from '~/types/sponsor'
4141
import SponsorPlan from '~/types/sponsorPlan'
4242
import BaseSection from '~/components/BaseSection.vue'
4343
@@ -48,7 +48,7 @@ import BaseSection from '~/components/BaseSection.vue'
4848
})
4949
export default class TheSponsorListSection extends Vue {
5050
@Getter('sponsorsByPlan', { namespace: 'sponsors' })
51-
private sponsorsByPlan!: (plan: string) => SponsorList[]
51+
private sponsorsByPlan!: (plan: string) => Sponsor[]
5252
5353
@Getter('sponsorPlansHavingSponsors', { namespace: 'sponsors' })
5454
private sponsorPlansHavingSponsors!: SponsorPlan[]

src/pages/sponsors.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979

8080
<script lang="ts">
8181
import { Component, Getter, Vue } from 'nuxt-property-decorator'
82-
import SponsorList from '~/types/sponsors'
82+
import Sponsor from '~/types/sponsor'
8383
import SponsorPlan from '~/types/sponsorPlan'
8484
import BaseMain from '~/components/BaseMain.vue'
8585
import BaseButton from '~/components/BaseButton.vue'
@@ -92,7 +92,7 @@ import BaseButton from '~/components/BaseButton.vue'
9292
})
9393
export default class SponsorsPage extends Vue {
9494
@Getter('sponsorsByPlan', { namespace: 'sponsors' })
95-
private sponsorsByPlan!: (plan: string) => SponsorList[]
95+
private sponsorsByPlan!: (plan: string) => Sponsor[]
9696
9797
@Getter('sponsorPlansHavingSponsors', { namespace: 'sponsors' })
9898
private sponsorPlansHavingSponsors!: SponsorPlan[]

src/store/sponsors.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
import { Getters, Mutations, Actions } from '~/types/store'
2-
import SponsorList from '~/types/sponsors'
2+
import Sponsor from '~/types/sponsor'
33
import SponsorPlan from '~/types/sponsorPlan'
44
import { getSponsors } from '~/plugins/contentful'
55

66
namespace Sponsors {
77
export type State = {
8-
sponsors: SponsorList[]
8+
sponsors: Sponsor[]
99
sponsorPlans: SponsorPlan[]
1010
}
1111

1212
export type Getters = {
13-
sponsorsByPlan: (plan: string) => SponsorList[]
13+
sponsorsByPlan: (plan: string) => Sponsor[]
1414
sponsorPlansHavingSponsors: SponsorPlan[]
1515
}
1616

1717
export type Mutations = {
18-
setSponsors: SponsorList[]
18+
setSponsors: Sponsor[]
1919
}
2020

2121
export type Actions = {
@@ -68,7 +68,7 @@ export const actions: Actions<
6868
Sponsors.Mutations
6969
> = {
7070
async fetchSponsors({ commit }) {
71-
const sponsors: SponsorList[] = await getSponsors()
71+
const sponsors: Sponsor[] = await getSponsors()
7272
commit('setSponsors', sponsors)
7373
}
7474
}
File renamed without changes.

test/unit/specs/components/TheSponsorListSection.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { mount, RouterLinkStub, createLocalVue } from '@vue/test-utils'
22
import VueLazyLoad from 'vue-lazyload'
33
import Vuex from 'vuex'
44
import createFullStore from '../utils/createFullStore'
5-
import sponsorList from '../../../fixtures/contentful/sponsors'
5+
import sponsorList from '../../../fixtures/contentful/sponsorList'
66
import TheSponsorListSection from '~/components/TheSponsorListSection.vue'
77

88
const localVue = createLocalVue()

test/unit/specs/pages/sponsors.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { mount, RouterLinkStub, createLocalVue } from '@vue/test-utils'
22
import Vuex from 'vuex'
3-
import sponsorList from '../../../fixtures/contentful/sponsors'
3+
import sponsorList from '../../../fixtures/contentful/sponsorList'
44
import createFullStore from '../utils/createFullStore'
55
import SponsorsPage from '~/pages/sponsors.vue'
66

test/unit/specs/store/sponsors.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import sponsorList from '../../../fixtures/contentful/sponsors'
1+
import sponsorList from '../../../fixtures/contentful/sponsorList'
22
import * as contentful from '~/plugins/contentful'
3-
import SponsorPlan from '~/types/sponsorPlan'
3+
import Sponsor from '~/types/sponsor'
44
import {
55
state as initialState,
66
getters,
@@ -22,7 +22,7 @@ describe('sponsors module', () => {
2222
})
2323

2424
test('plan と一致するスポンサー情報のみ取得できる', () => {
25-
const platinumSponsors: SponsorPlan[] = [sponsorList[2]]
25+
const platinumSponsors: Sponsor[] = [sponsorList[2]]
2626
expect(getters.sponsorsByPlan(state)('platinum')).toEqual(
2727
platinumSponsors
2828
)

test/unit/specs/utils/createFullStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import speakersData from '../../../fixtures/contentful/speakers'
22
import timeTableSectionsData from '../../../fixtures/contentful/timeTableSections'
33
import eventContainersData from '../../../fixtures/contentful/eventContainers'
44
import eventContainerPartsData from '../../../fixtures/contentful/eventContainerParts'
5-
import sponsorsData from '../../../fixtures/contentful/sponsors'
5+
import sponsorsData from '../../../fixtures/contentful/sponsorList'
66
import * as localSessions from '~/store/localSessions'
77
import * as localSpeakers from '~/store/localSpeakers'
88
import * as speakers from '~/store/speakers'

0 commit comments

Comments
 (0)