mirror of
https://github.com/Fluffy-Bean/TastyBites.git
synced 2025-06-04 17:33:13 +00:00
This commit fixes the style issues introduced in 6e31b44
according to the output
from Prettier.
Details: None
29 lines
569 B
JavaScript
29 lines
569 B
JavaScript
import TestData from "%/lib/test-data.ts";
|
|
|
|
export async function getPopularToday() {
|
|
const res = await fetch("/api/items");
|
|
const data = res.json();
|
|
|
|
if (res.ok) {
|
|
return data;
|
|
} else {
|
|
throw new Error("Failed to fetch popular today");
|
|
}
|
|
}
|
|
|
|
export function getMenuItems() {
|
|
return [
|
|
{
|
|
name: "Main Menu",
|
|
items: TestData,
|
|
},
|
|
{
|
|
name: "Breakfast",
|
|
items: [],
|
|
},
|
|
{
|
|
name: "Seasonal",
|
|
items: TestData,
|
|
},
|
|
];
|
|
}
|