style: format code with Prettier

This commit fixes the style issues introduced in 18b22e7 according to the output
from Prettier.

Details: None
This commit is contained in:
deepsource-autofix[bot] 2024-05-14 12:31:43 +00:00 committed by GitHub
parent 18b22e7928
commit e60ff198d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 5 deletions

View file

@ -4,7 +4,7 @@ const API_URL = "http://127.0.0.1:8080";
export async function getPopularToday(): Promise<Item[]> {
const response = await fetch(`${API_URL}/api/items`);
const {data, error}: JSONResponse = await response.json();
const { data, error }: JSONResponse = await response.json();
if (response.ok) {
if (data?.item) {

View file

@ -25,7 +25,9 @@ export async function getPopularToday(): Promise<Item[]> {
return cache["popular_today"];
}
export async function getMenuItems(): Promise<{ name: string; items: Item[] }[]> {
export async function getMenuItems(): Promise<
{ name: string; items: Item[] }[]
> {
await fakeDelay(20);
return [
{
@ -66,7 +68,11 @@ export async function getItemByUUID(uuid: string): Promise<Item> {
return data[0];
}
export async function postContactEmail(name: string, email: string, message: string): Promise<string> {
export async function postContactEmail(
name: string,
email: string,
message: string
): Promise<string> {
await fakeDelay(200);
if (!name) throw new Error("Name missing");
@ -77,7 +83,9 @@ export async function postContactEmail(name: string, email: string, message: str
return "Check your email to confirm the message!";
}
export async function postVerifyCart(cartData: Record<string, CartItem>): Promise<Record<string, CartItem>> {
export async function postVerifyCart(
cartData: Record<string, CartItem>
): Promise<Record<string, CartItem>> {
let verifiedItems: Item[] = [];
try {

View file

@ -23,7 +23,7 @@ export type CartItem = {
export type JSONResponse = {
data?: {
item: Item[], // Todo Make this not just item type
item: Item[]; // Todo Make this not just item type
};
error?: string;
};