Skip to content

Commit

Permalink
Merge pull request #10963 from wellcomecollection/rename-type
Browse files Browse the repository at this point in the history
rename type to bring it in line with others
  • Loading branch information
gestchild authored Jun 20, 2024
2 parents 9de863c + c90c53f commit 1e5cb73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions common/server-data/prismic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as prismic from '@prismicio/client';
import { InferDataInterface } from '../services/prismic/types';
import { createClient as createPrismicClient } from '@weco/common/services/prismic/fetch';

export type CollectionVenuePrismicDocumentLite = {
export type RawCollectionVenueDocumentLite = {
id: string;
} & {
data: Omit<
Expand All @@ -19,7 +19,7 @@ export type CollectionVenuePrismicDocumentLite = {
};

export type ResultsLite = {
results: CollectionVenuePrismicDocumentLite[];
results: RawCollectionVenueDocumentLite[];
};

export const defaultValue = {
Expand Down
6 changes: 3 additions & 3 deletions common/services/prismic/transformers/collection-venues.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
ResultsLite,
CollectionVenuePrismicDocumentLite,
RawCollectionVenueDocumentLite,
} from '../../../server-data/prismic';
import { DayOfWeek, formatTime } from '@weco/common/utils/format-date';
import { Venue, OpeningHoursDay } from '@weco/common/model/opening-hours';
Expand All @@ -13,7 +13,7 @@ import { CollectionVenueDocument as RawCollectionVenueDocument } from '@weco/com

export function createRegularDay(
day: DayOfWeek,
venue: RawCollectionVenueDocument | CollectionVenuePrismicDocumentLite
venue: RawCollectionVenueDocument | RawCollectionVenueDocumentLite
): OpeningHoursDay {
const { data } = venue;
const lowercaseDay = day.toLowerCase();
Expand All @@ -40,7 +40,7 @@ export function createRegularDay(
}

export function transformCollectionVenue(
venue: RawCollectionVenueDocument | CollectionVenuePrismicDocumentLite
venue: RawCollectionVenueDocument | RawCollectionVenueDocumentLite
): Venue {
const data = venue.data;
const exceptionalOpeningHours = data.modifiedDayOpeningTimes
Expand Down

0 comments on commit 1e5cb73

Please sign in to comment.