Skip to content

Commit

Permalink
fix(studio): Set default observation year to the not embargo one /2
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Feb 6, 2024
1 parent 473c718 commit 9034832
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/Studio/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { CopyToClipboard } from 'react-copy-to-clipboard';
import { useIntl } from 'react-intl';

import downloadFile from '../../utils/files';
import { getCSSValue } from '../../utils/helpers';
import { getCSSValue, getObservationLabel } from '../../utils/helpers';
import useGlobals from '../../utils/Hooks/useGetGlobals';
import tree from './tree';

Expand All @@ -26,9 +26,11 @@ const Studio = () => {
const [firstObservationYear, setFirstObservationYear] = useState(2018);
const [lang, setLang] = useState('fr');
const [lastObservationYear, setLastObservationYear] = useState(
lastObservationSnap > process.env.REACT_APP_LAST_OBSERVATION
? process.env.REACT_APP_LAST_OBSERVATION
: lastObservationSnap,
getObservationLabel(
lastObservationSnap > process.env.REACT_APP_LAST_OBSERVATION
? process.env.REACT_APP_LAST_OBSERVATION
: lastObservationSnap,
),
);
const [object, setObject] = useState('publi');
const [startYear, setStartYear] = useState(2013);
Expand Down

0 comments on commit 9034832

Please sign in to comment.