Skip to content

Commit

Permalink
Removed the old dh list and unneeded variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Noahkmm committed May 6, 2024
1 parent 40f9981 commit cfa45f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 35 deletions.
29 changes: 2 additions & 27 deletions app/[dh_choice]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function name_to_dh_index(dhName: string, dhArray: Array<DiningHall>) {
return -1;
}

function Accordion({ category, index }) {
function Accordion({ category }) {
const [isOpen, setIsOpen] = useState(false);

return (
Expand Down Expand Up @@ -96,40 +96,15 @@ export default function Page({ searchParams }) {
return (
<main>
<div className="container mx-auto">
<<<<<<< HEAD
{/* Dining Hall Name */}
<h1 className="font-semibold py-5 text-4xl text-[#00458C] ">
{searchParams.name}
</h1>

{/* List all the meal times and their foods */}
{
// create an array of arrays of the meal times and their foods
meal_times &&
Object.entries(meal_times).map(
([meal_time, foods]: Array<string | Array<string> | any>, i) => (
<div key={i}>
<h3 className="text-lg py-5">{meal_time}</h3>
<ul>
{foods.map((food: string, j: number) => (
<li key={j}>{food}</li>
))}
</ul>
</div>
)
)
}
=======
<h2 className="text-2xl mb-4">{searchParams.name}</h2>
{categories.map((category, i) => (
<div key={i}>
{/* <h3 className="text-lg">{category.name}</h3> */}
<div>
<Accordion category={category} index={i} />
<Accordion category={category} />
</div>
</div>
))}
>>>>>>> origin
</div>
</main>
);
Expand Down
8 changes: 0 additions & 8 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,6 @@ function Home() {
</ul>
</h3>

<ul className="">
{dhs_names.map((dh, i) => (
<li key={i}>
<ButtonLink button_name={dh} name={dh} />
</li>
))}
</ul>

</div>
</main>
);
Expand Down

0 comments on commit cfa45f2

Please sign in to comment.