Skip to content

Commit

Permalink
Show extra parking services in ParkingView - pt. 3
Browse files Browse the repository at this point in the history
  • Loading branch information
bartwr committed Apr 3, 2024
1 parent cdf585c commit 3c922f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
20 changes: 10 additions & 10 deletions src/components/parking/ParkingViewServices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const ParkingViewServices = ({ parkingdata }: { parkingdata: any }) => {

if (
(parkingdata.fietsenstallingen_services === null || parkingdata.fietsenstallingen_services === undefined)
&& !parkingdata.ExtraServices
) {
return null
}
Expand All @@ -48,19 +47,20 @@ const ParkingViewServices = ({ parkingdata }: { parkingdata: any }) => {
</div>
);
})}
{(parkingdata && parkingdata.ExtraServices) && <>
{parkingdata.ExtraServices.split(', ').map((service: string) => {
return (
<div key={service}>
{service}
</div>
);
})}
</>}
</div>
</SectionBlock>
<HorizontalDivider className="my-4" />
</>
};

export default ParkingViewServices;

// {(parkingdata && parkingdata.ExtraServices) && <>
// {parkingdata.ExtraServices.split(', ').map((service: string) => {
// return (
// <div key={service}>
// {service}
// </div>
// );
// })}
// </>}
1 change: 0 additions & 1 deletion src/utils/parkings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ export const formatOpeningTimes = (
): React.ReactNode => {
const wkday = new Date().getDay();

console.log('parkingdata[getOpenTimeKey(day)]', parkingdata[getOpenTimeKey(day)]);
const tmpopen: Date = new Date(parkingdata[getOpenTimeKey(day)]);
const hoursopen = tmpopen.getHours() - 1;//TODO
const minutesopen = String(tmpopen.getMinutes()).padStart(2, "0");
Expand Down

0 comments on commit 3c922f8

Please sign in to comment.