Skip to content

Commit

Permalink
format all code
Browse files Browse the repository at this point in the history
  • Loading branch information
IanHollow committed May 14, 2024
1 parent 3f77660 commit 4903e27
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 26 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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`

Expand Down
46 changes: 23 additions & 23 deletions app/[location]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,29 +50,29 @@ export default function Page({ params }: { params: { location: number } }) {
<h1 className="font-semibold py-5 text-4xl text-[#003C6C]">
{location && location.name}
</h1>
{location && location.categories.map((category, i) => (
<div key={i}>
<h2>{category.name}</h2>
{category.sub_categories.map((subCategory, j) => (
<div key={j}>
<h3>{subCategory.name}</h3>
{subCategory.foods.map((food, k) => (
<div key={k}>
<h4>{food.name}</h4>
<ul>
{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
<li key={l}>{restrictions}</li>
))}
</ul>
</div>
))}
</div>
))}
</div>
))
}
{location &&
location.categories.map((category, i) => (
<div key={i}>
<h2>{category.name}</h2>
{category.sub_categories.map((subCategory, j) => (
<div key={j}>
<h3>{subCategory.name}</h3>
{subCategory.foods.map((food, k) => (
<div key={k}>
<h4>{food.name}</h4>
<ul>
{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
<li key={l}>{restrictions}</li>
))}
</ul>
</div>
))}
</div>
))}
</div>
))}
</div>
</main>
);
Expand Down
11 changes: 8 additions & 3 deletions components/dh_bar_main.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div className="flex items-center justify-center pb-4 ">
<div className="border hover:border-black w-1/2 px-8 py-3 bg-[#F9F9F9] m4">
<ul className="flex flex-col md:flex-row font-semibold text-2xl ">
<li className=" text-[#00458C]">
<Link href={`/${index}`}>{name}</Link >

<Link href={`/${index}`}>{name}</Link>
</li>
</ul>
</div>
Expand Down

0 comments on commit 4903e27

Please sign in to comment.