Skip to content

Commit

Permalink
fix: set the current year as default in carbon credit by status
Browse files Browse the repository at this point in the history
  • Loading branch information
newweborder007 committed Oct 31, 2024
1 parent 301fb68 commit 3f2fc1a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import { capitalizeText } from '@/utils/text-utils';
ChartJS.register(ArcElement, Tooltip, Legend);

const CarbonCreditByStatusChart: React.FC = () => {
const currentYear = new Date().getFullYear();
const [unitStatus] = useQueryParamState('carbonCreditUnitStatus', 'all');
const [vintageYear, setVintageYear] = useQueryParamState('vintageYear', undefined);
const [vintageYear, setVintageYear] = useQueryParamState('vintageYear', String(currentYear));
const intl: IntlShape = useIntl();

const {
Expand Down

0 comments on commit 3f2fc1a

Please sign in to comment.