(field: Field)
| 112 | }; |
| 113 | |
| 114 | function getFieldCenter(field: Field) { |
| 115 | const coords = field.coordinates[0]; |
| 116 | const lat = coords.reduce((sum, c) => sum + c[1], 0) / coords.length; |
| 117 | const lng = coords.reduce((sum, c) => sum + c[0], 0) / coords.length; |
| 118 | return { lat, lng }; |
| 119 | } |
| 120 | |
| 121 | interface WeatherViewProps { |
| 122 | activeField: Field | null; |
no outgoing calls
no test coverage detected