Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function App() {
const locations = data?.map((location) => ({
...location,
name: toTitleCase(location.name ?? 'Untitled'), // Convert names to title case
})) satisfies ILocation_FromAPI[] | undefined;
})) as ILocation_FromAPI[] | undefined;

const [cardViewPreferences, setCardViewPreferences] = useUserCardViewPreferences();
useRefreshWhenBackOnline();
Expand Down
Binary file added src/assets/menu_images/capital_grains_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/capital_grains_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/ciao_bella_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/ciao_bella_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/crisp_and_crust_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/crisp_and_crust_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/exchange_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/exchange_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/exchange_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/exchange_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/exchange_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/exchange_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/exchange_7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/exchange_8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/forbes_ave_subs_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/forbes_ave_subs_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/gallo_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/gallo_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/gallo_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/gallo_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/hunan_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/hunan_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/hunan_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/la_prima_gates_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/la_prima_gates_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/menu_images/la_prima_gates_3.png
Binary file added src/assets/menu_images/la_prima_wean_1.png
Binary file added src/assets/menu_images/la_prima_wean_2.png
Binary file added src/assets/menu_images/millies_1.png
Binary file added src/assets/menu_images/millies_2.png
Binary file added src/assets/menu_images/ola_ola_1.png
Binary file added src/assets/menu_images/ola_ola_2.png
Binary file added src/assets/menu_images/redhawk_1.png
Binary file added src/assets/menu_images/redhawk_2.png
Binary file added src/assets/menu_images/rev_1.png
Binary file added src/assets/menu_images/rev_2.png
Binary file added src/assets/menu_images/shake_smart_1.png
Binary file added src/assets/menu_images/shake_smart_2.png
Binary file added src/assets/menu_images/stackd_1.png
Binary file added src/assets/menu_images/stackd_2.png
Binary file added src/assets/menu_images/stackd_desser_1.png
Binary file added src/assets/menu_images/tepper_taqueria_1.png
Binary file added src/assets/menu_images/tepper_taqueria_2.png
Binary file added src/assets/menu_images/wild_blue_1.png
Binary file added src/assets/menu_images/wild_blue_2.png
Binary file added src/assets/menu_images/wild_blue_3.png
18 changes: 18 additions & 0 deletions src/components/DrawerTabContent.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,21 @@
text-decoration: underline;
}
}

.menu-images-gallery {
display: flex;
flex-direction: column;
gap: 16px;
}

.menu-image {
width: 100%;
max-width: 100%;
height: auto;
border-radius: 8px;
object-fit: contain;
}

.hidden-menu-text {
display: none;
}
14 changes: 13 additions & 1 deletion src/components/DrawerTabContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,23 @@ function DrawerTabContent() {
}

function renderMenu() {
const images = location.images ?? [];
const menuItemsString = location.menuItemsString ?? '';

return (
<>
<h4 className={css['section-header']}>Menu</h4>
<div>
{menu ? (
{images.length > 0 ? (
<>
<div className={css['menu-images-gallery']}>
{images.map((menuUrl) => (
<img key={menuUrl} src={menuUrl} alt={menuUrl} className={css['menu-image']} />
))}
</div>
{menuItemsString && <div className={css['hidden-menu-text']}>{menuItemsString}</div>}
</>
) : menu ? (
<a className={css['inline-link']} href={menu} target="_blank" rel="noreferrer">
<span>View menu online</span>
<ExternalLink size={14} aria-hidden />
Expand Down
2 changes: 2 additions & 0 deletions src/types/api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ export interface operations {
acceptsOnlineOrders: boolean;
id: string;
conceptId: (string | null) | null;
images: string[];
menuItemsString: (string | null) | null;
}[];
};
};
Expand Down
3 changes: 3 additions & 0 deletions src/types/locationTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ export interface ILocation_FromAPI {
todaysSoups: ISpecial[];
/** The id provided on the dining services website */
conceptId: string | null;
/** List of menu image filenames */
images: string[];
menuItemsString: string | null;
}
export interface IStatusMessage {
shortStatus: [string, string];
Expand Down
2 changes: 1 addition & 1 deletion src/util/useFilteredLocations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import assert from './assert';

const FUSE_OPTIONS: IFuseOptions<ILocation_Full> = {
// keys to perform the search on
keys: ['name', 'location', 'shortDescription', 'description'],
keys: ['name', 'location', 'shortDescription', 'description', 'menuItemsString'],
ignoreLocation: true,
threshold: 0.2,
};
Expand Down
Loading