Skip to content

Commit

Permalink
fix: make translation function required in getReserveeName
Browse files Browse the repository at this point in the history
  • Loading branch information
vincit-matu committed May 7, 2024
1 parent 5a5f339 commit 4f1ea6f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
} from "common/src/helpers";
import { RELATED_RESERVATION_STATES } from "common/src/const";
import { ReservationUnitWithAffectingArgs } from "common/src/queries/fragments";
import {t} from "i18next";

Check failure on line 31 in apps/admin-ui/src/component/my-units/ReservationUnitCalendar.tsx

View workflow job for this annotation

GitHub Actions / Lint admin ui

Replace `t` with `·t·`

type Props = {
begin: string;
Expand Down Expand Up @@ -57,7 +58,7 @@ const getEventTitle = ({
const reservationUnit = reservation.reservationUnit?.[0];
const isOtherReservationUnit = reservationUnitPk !== reservationUnit?.pk;

const reserveeName = getReserveeName(reservation);
const reserveeName = getReserveeName(reservation, t);
if (isOtherReservationUnit) {
const reservationUnitName = reservationUnit?.nameFi ?? "";

Expand Down
2 changes: 1 addition & 1 deletion apps/admin-ui/src/component/reservations/requested/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export const getTranslationKeyForCustomerTypeChoice = (

export const getReserveeName = (
reservation: ReservationNode,
t?: TFunction,
t: TFunction,
length = 50
): string => {
let prefix = "";
Expand Down

0 comments on commit 4f1ea6f

Please sign in to comment.