Skip to content

Commit

Permalink
chore: add data typings
Browse files Browse the repository at this point in the history
  • Loading branch information
wazolab committed Mar 4, 2024
1 parent 5029dec commit a422462
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
9 changes: 7 additions & 2 deletions components/PoisCard/PoiCardContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import { defineNuxtComponent } from '#app'
import Fields from '~/components/PoisCard/Fields.vue'
import FavoriteIcon from '~/components/UI/FavoriteIcon.vue'
import TeritorioIcon from '~/components/UI/TeritorioIcon.vue'
import type { ApiPoi, ApiPoiId } from '~/lib/apiPois'
import type { ApiPoi, ApiPoiId, ApiPoiProperties } from '~/lib/apiPois'
import { coordinatesHref } from '~/lib/coordinates'
import { favoritesStore } from '~/stores/favorite'
import { mapStore } from '~/stores/map'
import { isIOS } from '~/utils/isIOS'
import ContribFieldGroup from '~/components/Fields/ContribFieldGroup.vue'
import type { ContribFields } from '~/composables/useContrib'
export default defineNuxtComponent({
components: {
Expand All @@ -37,7 +38,11 @@ export default defineNuxtComponent({
},
},
data() {
data(): {
contribMode: boolean
isContribEligible: (properties: ApiPoiProperties) => boolean
getContributorFields: (feature: ApiPoi) => ContribFields
} {
const { contribMode, isContribEligible, getContributorFields } = useContrib()
return {
Expand Down
9 changes: 7 additions & 2 deletions components/PoisDetails/PoiDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ import RelativeDate from '~/components/UI/RelativeDate.vue'
import TeritorioIcon from '~/components/UI/TeritorioIcon.vue'
import type { ContentEntry } from '~/lib/apiContent'
import type { ApiPoiDeps } from '~/lib/apiPoiDeps'
import type { ApiPoi, ApiPoiId, FieldsList } from '~/lib/apiPois'
import type { ApiPoi, ApiPoiId, ApiPoiProperties, FieldsList } from '~/lib/apiPois'
import type { Settings } from '~/lib/apiSettings'
import { PropertyTranslationsContextEnum } from '~/plugins/property-translations'
import { favoritesStore } from '~/stores/favorite'
import { OriginEnum } from '~/utils/types'
import FieldsHeader from '~/components/UI/FieldsHeader.vue'
import ContribFieldGroup from '~/components/Fields/ContribFieldGroup.vue'
import type { ContribFields } from '~/composables/useContrib'
export default defineNuxtComponent({
components: {
Expand Down Expand Up @@ -60,7 +61,11 @@ export default defineNuxtComponent({
},
},
data() {
data(): {
contribMode: boolean
isContribEligible: (properties: ApiPoiProperties) => boolean
getContributorFields: (feature: ApiPoi) => ContribFields
} {
const { contribMode, isContribEligible, getContributorFields } = useContrib()
return {
Expand Down
9 changes: 7 additions & 2 deletions components/PoisList/PoisTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
import type { PropType } from 'vue'
import { defineNuxtComponent } from '#app'
import Field from '~/components/Fields/Field.vue'
import type { ApiPois, FieldsListItem } from '~/lib/apiPois'
import type { ApiPoi, ApiPoiProperties, ApiPois, FieldsListItem } from '~/lib/apiPois'
import { PropertyTranslationsContextEnum } from '~/plugins/property-translations'
import ContribFieldGroup from '~/components/Fields/ContribFieldGroup.vue'
import type { ContribFields } from '~/composables/useContrib'
export default defineNuxtComponent({
components: {
Expand All @@ -21,7 +22,11 @@ export default defineNuxtComponent({
required: true,
},
},
data() {
data(): {
contribMode: boolean
isContribEligible: (properties: ApiPoiProperties) => boolean
getContributorFields: (feature: ApiPoi) => ContribFields
} {
const { contribMode, isContribEligible, getContributorFields } = useContrib()
return {
contribMode,
Expand Down

0 comments on commit a422462

Please sign in to comment.