Fix type error
parent
2c8c0fca5e
commit
98a8941fdf
|
@ -1,5 +1,4 @@
|
|||
import { FabriqueSocialEntreprise } from '@/api/fabrique-social'
|
||||
import { ApiCommuneJson } from '@/components/conversation/select/SelectCommune'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { useDispatch } from 'react-redux'
|
||||
import { useHistory } from 'react-router'
|
||||
|
|
|
@ -36,7 +36,7 @@ export async function searchCommunes(
|
|||
if (!response.ok) {
|
||||
return null
|
||||
}
|
||||
const json: Array<ApiCommuneJson> = await response.json()
|
||||
const json = (await response.json()) as Array<ApiCommuneJson>
|
||||
return json
|
||||
.flatMap(({ codesPostaux, ...commune }) =>
|
||||
codesPostaux
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Action } from '@/actions/actions'
|
||||
import { ApiCommuneJson } from '@/components/conversation/select/SelectCommune'
|
||||
import { ApiCommuneJson, Commune } from '@/api/commune'
|
||||
import { PreviousSimulation } from '@/selectors/previousSimulationSelectors'
|
||||
import { DottedName } from 'modele-social'
|
||||
import { defaultTo, without } from 'ramda'
|
||||
|
@ -61,7 +61,7 @@ export type Situation = Partial<
|
|||
Overwrite<
|
||||
Record<DottedName, string | number | { valeur: number; unité: string }>,
|
||||
{
|
||||
'établissement . localisation': { objet: ApiCommuneJson }
|
||||
'établissement . localisation': { objet: Commune }
|
||||
'entreprise . imposition': string
|
||||
année: number
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue