Skip to content
Snippets Groups Projects
Commit 2d5e4aa9 authored by Bjarke Madsen's avatar Bjarke Madsen
Browse files

filter for non-null fee type

parent 115b72b3
No related branches found
No related tags found
1 merge request!135Refactor remaining pages & improvements
This commit is part of merge request !135. Comments created here will be created in the context of that merge request.
......@@ -10,8 +10,11 @@ import { useData } from "../../helpers/useData";
import PillTable from "../../components/PillTable";
function ChargingStructurePage(): React.ReactElement {
const validityCheck = (data: ChargingStructure) => data.fee_type != null;
const { filterSelection, setFilterSelection } = useContext(FilterSelectionContext);
const { data, years, nrens } = useData<ChargingStructure>('/api/charging/', setFilterSelection);
const { data, years, nrens } = useData<ChargingStructure>('/api/charging/', setFilterSelection, validityCheck);
const selectedData = data.filter(data =>
filterSelection.selectedYears.includes(data.year) && filterSelection.selectedNrens.includes(data.nren)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment