Skip to content

Commit df14d50

Browse files
committed
chore(arc): extract hidden event param to a constant
1 parent f61cc1e commit df14d50

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/features/abstract-resource-calendar/components/abstract-resource-calendar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { fetchResources } from "@/features/backend";
55
import type { Resource } from "@/features/resources";
66
import type { ResourcePageProps } from "@/types/components";
77

8+
import { HIDDEN_EVENT_QUERY_PARAM } from "../constants";
89
import type {
910
CalendarDataMapper,
1011
ResourceCalendarProps,
@@ -30,7 +31,7 @@ export async function AbstractResourceCalendar<T extends Resource>({
3031
const resourceData = await fetchResources(
3132
resource,
3233
true,
33-
isSolvroAdmin ? "?showHidden=true" : "",
34+
isSolvroAdmin ? HIDDEN_EVENT_QUERY_PARAM : "",
3435
);
3536

3637
const mappedData = dataMapper(resourceData, clickable);

src/features/abstract-resource-calendar/components/arc-hide-button-with-dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export function ArcHideButtonWithDialog({
3737
onHideSuccess,
3838
...props
3939
}: {
40-
resource: Resource;
40+
resource: Resource.CalendarEvents;
4141
googleCalId: string;
4242
hidden: boolean;
4343
itemName?: string;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
export const CALENDAR_MAX_EVENTS_PER_DAY = 5;
22

33
export const WEEKDAYS = ["Pn", "Wt", "Śr", "Cz", "Pt", "So", "Nd"];
4+
5+
export const HIDDEN_EVENT_QUERY_PARAM = "?showHidden=true";

0 commit comments

Comments
 (0)