diff --git a/apps/frontend/src/components/NearbyVenues.tsx b/apps/frontend/src/components/NearbyVenues.tsx index 8c1eb61..9f26d7a 100644 --- a/apps/frontend/src/components/NearbyVenues.tsx +++ b/apps/frontend/src/components/NearbyVenues.tsx @@ -131,25 +131,46 @@ export default function NearbyVenues({ )} {hasLocation && venues.length > 0 && ( - + +

+ Not in {venues[0].cityName}? Search for your city in the search + bar above! +

+ + )} + + + )} ) diff --git a/apps/frontend/src/components/VenueCard.tsx b/apps/frontend/src/components/VenueCard.tsx index 6c0a194..d51d69c 100644 --- a/apps/frontend/src/components/VenueCard.tsx +++ b/apps/frontend/src/components/VenueCard.tsx @@ -15,6 +15,7 @@ export function venueToSearchResult(current: venue): SearchResult { return { id: current.id, cityId: current.city.id, + cityName: current.city.name, type: 'venue', name: current.name, lat: current.lat, diff --git a/apps/frontend/src/routes/index.tsx b/apps/frontend/src/routes/index.tsx index 9941612..78e79d6 100644 --- a/apps/frontend/src/routes/index.tsx +++ b/apps/frontend/src/routes/index.tsx @@ -59,6 +59,7 @@ const NEARBY_QUERY = ` lon city { id + name } openingHours { days @@ -110,6 +111,7 @@ function toSearchResult(venue: NearbyVenue): SearchResult { return { id: venue.id, cityId: venue.city.id, + cityName: venue.city.name, type: 'venue', name: venue.name, lat: venue.lat, diff --git a/apps/frontend/src/test/fixtures.ts b/apps/frontend/src/test/fixtures.ts index ff101cf..ee22805 100644 --- a/apps/frontend/src/test/fixtures.ts +++ b/apps/frontend/src/test/fixtures.ts @@ -37,6 +37,7 @@ export function makeSearchResult( return { id: 'venue-1', cityId: 'trondheim', + cityName: 'Trondheim', type: 'venue', name: 'Studentersamfundet', lat: 63.4228, diff --git a/apps/frontend/src/types/search.ts b/apps/frontend/src/types/search.ts index b953d64..5b1a7c6 100644 --- a/apps/frontend/src/types/search.ts +++ b/apps/frontend/src/types/search.ts @@ -33,6 +33,7 @@ export interface SearchPriceSighting { export interface SearchResult { id: string cityId: string | null + cityName: string | null type: 'venue' | 'city' name: string lat: number diff --git a/apps/frontend/src/types/venue.ts b/apps/frontend/src/types/venue.ts index 4bae5b0..516d1a7 100644 --- a/apps/frontend/src/types/venue.ts +++ b/apps/frontend/src/types/venue.ts @@ -53,7 +53,7 @@ export interface NearbyVenue { address: string lat: number lon: number - city: { id: string } + city: { id: string; name: string } openingHours: VenueOpeningHours[] openingHoursNotes: VenueOpeningHoursNote[] pricesSighted: VenuePriceSighting[]