From db888ccdd9593308a72d7fb7fa5900baab5fb83f Mon Sep 17 00:00:00 2001 From: Fabien Puech Date: Thu, 6 Oct 2022 15:44:08 +0200 Subject: [PATCH] feat: implements a way to disable cloud cover (#78) --- .pre-commit-config.yaml | 2 +- package.json | 4 ++-- src/CodeGenerator.ts | 2 +- src/FormComponent.tsx | 8 ++++++-- src/SearchService.ts | 2 +- src/browser.tsx | 2 +- src/types.ts | 1 + style/base.css | 4 ++++ yarn.lock | 25 ++++++++++++++++++++++++- 9 files changed, 41 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7e7689f..84d5d51 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -53,7 +53,7 @@ repos: - eslint-plugin-prettier@^4.2.1 - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.0-alpha.0 + rev: v2.7.1 hooks: - id: prettier diff --git a/package.json b/package.json index 81645dc..60e18a6 100644 --- a/package.json +++ b/package.json @@ -63,8 +63,8 @@ "react": "^17.0.2", "react-datepicker": "4.8.0", "react-dom": "^17.0.2", - "react-hook-form": "7.36.1", - "react-leaflet": "2.8.0", + "react-hook-form": "^7.36.1", + "react-leaflet": "~2.8.0", "react-leaflet-draw": "0.19.0", "react-modal": "3.15.1", "react-select": "5.4.0", diff --git a/src/CodeGenerator.ts b/src/CodeGenerator.ts index e346946..eded87f 100644 --- a/src/CodeGenerator.ts +++ b/src/CodeGenerator.ts @@ -48,7 +48,7 @@ dag = EODataAccessGateway() code += ` end="${end}", `; } - if (cloud !== undefined) { + if (cloud !== 100) { code += ` cloudCover=${cloud}, `; } diff --git a/src/FormComponent.tsx b/src/FormComponent.tsx index 0408f3e..2d5a420 100644 --- a/src/FormComponent.tsx +++ b/src/FormComponent.tsx @@ -22,7 +22,7 @@ import Autocomplete from './Autocomplete'; import { EODAG_SERVER_ADRESS } from './config'; import SearchService from './SearchService'; import { ChangeEvent } from 'react'; -//import { OptionTypeBase } from 'react-select'; +// import { OptionTypeBase } from 'react-select'; import MapExtentComponent from './MapExtentComponent'; import _ from 'lodash'; import { IFormInput } from './types'; @@ -218,7 +218,11 @@ export const FormComponent: FC = ({ /> -