Skip to content

Commit

Permalink
Make it even clearer that we show a status label for digital devices
Browse files Browse the repository at this point in the history
By making a component dedicted for that use:
ReservationStatusInfoLabelDigital
  • Loading branch information
spaceo committed Oct 26, 2023
1 parent c637b2c commit 33dd070
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/components/GroupModal/GroupModalReservationsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import usePager from "../result-pager/use-pager";
import { ReservationType } from "../../core/utils/types/reservation-type";
import StatusBadge from "../../apps/loan-list/materials/utils/status-badge";
import { formatDate } from "../../core/utils/helpers/date";
import ReservationStatusInfoLabel from "../reservation/ReservationStatusInfoLabel";
import ReservationStatusInfoLabelDigital from "../reservation/ReservationStatusInfoLabelDigital";

export interface GroupModalReservationsListProps {
materials: ReservationType[];
Expand Down Expand Up @@ -90,10 +90,7 @@ const GroupModalReservationsList: FC<GroupModalReservationsListProps> = ({
/>
) : (
expiryDate && (
<ReservationStatusInfoLabel
date={expiryDate}
isDigital
/>
<ReservationStatusInfoLabelDigital date={expiryDate} />
)
)
}
Expand Down
15 changes: 15 additions & 0 deletions src/components/reservation/ReservationStatusInfoLabelDigital.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import * as React from "react";
import { FC } from "react";
import ReservationStatusInfoLabel from "./ReservationStatusInfoLabel";

export interface ReservationStatusInfoLabelDigitalProps {
date: string;
}

const ReservationStatusInfoLabelDigital: FC<
ReservationStatusInfoLabelDigitalProps
> = ({ date }) => {
return <ReservationStatusInfoLabel date={date} isDigital />;
};

export default ReservationStatusInfoLabelDigital;

0 comments on commit 33dd070

Please sign in to comment.