From 4903e27863740e60f89f7773848518d52f0c63f9 Mon Sep 17 00:00:00 2001 From: Ian Holloway Date: Mon, 13 May 2024 23:29:14 -0700 Subject: [PATCH] format all code --- README.md | 1 + app/[location]/page.tsx | 46 +++++++++++++++++++------------------- components/dh_bar_main.tsx | 11 ++++++--- 3 files changed, 32 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index e958fc0..f7c1f14 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). ## Formatting Code + - For Python code run `black backend/**/*.py` - For All other code run `bun run prettier * --write` diff --git a/app/[location]/page.tsx b/app/[location]/page.tsx index dee79b8..26376e5 100644 --- a/app/[location]/page.tsx +++ b/app/[location]/page.tsx @@ -50,29 +50,29 @@ export default function Page({ params }: { params: { location: number } }) {

{location && location.name}

- {location && location.categories.map((category, i) => ( -
-

{category.name}

- {category.sub_categories.map((subCategory, j) => ( -
-

{subCategory.name}

- {subCategory.foods.map((food, k) => ( -
-

{food.name}

-
    - {food.restrictions.map((restrictions, l) => ( - // note the restrictions is an array of strings - // this should probably be displayed in a different way for the images -
  • {restrictions}
  • - ))} -
-
- ))} -
- ))} -
- )) - } + {location && + location.categories.map((category, i) => ( +
+

{category.name}

+ {category.sub_categories.map((subCategory, j) => ( +
+

{subCategory.name}

+ {subCategory.foods.map((food, k) => ( +
+

{food.name}

+
    + {food.restrictions.map((restrictions, l) => ( + // note the restrictions is an array of strings + // this should probably be displayed in a different way for the images +
  • {restrictions}
  • + ))} +
+
+ ))} +
+ ))} +
+ ))} ); diff --git a/components/dh_bar_main.tsx b/components/dh_bar_main.tsx index c654593..e1d805c 100644 --- a/components/dh_bar_main.tsx +++ b/components/dh_bar_main.tsx @@ -1,14 +1,19 @@ "use client"; import Link from "next/link"; -export default function DhBar({ name, index }: { name: string, index: number }) { +export default function DhBar({ + name, + index, +}: { + name: string; + index: number; +}) { return (
  • - {name} - + {name}