Skip to content

Commit

Permalink
Merge pull request #377 from Saksham2k3s/improve-canteen-section-page
Browse files Browse the repository at this point in the history
Solved issue 351
  • Loading branch information
hustlerZzZ authored Jun 26, 2024
2 parents 4a23d44 + 0862538 commit 478de21
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/pages/AddFoodItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { useState, useEffect, useContext } from "react";
import axios from "axios";
import { toast } from "react-hot-toast";
import { ThemeContext } from "../themeContext";

function AddFoodItem() {
const { theme } = useContext(ThemeContext);
const [formData, setFormData] = useState({
Expand Down Expand Up @@ -102,13 +103,13 @@ function AddFoodItem() {
};

return (
<div className={`flex justify-center items-center h-[80vh] ${theme === 'dark' ? 'bg-[#131b33]' : 'bg-white' }`}>

<div className={`flex justify-center items-center h-[80vh] ${theme === 'dark' ? 'bg-[#131b33]' : 'bg-white'}`}>
<form
onSubmit={handleSubmit}
className={`p-6 rounded shadow-lg w-full max-w-sm border-2 ${theme === 'dark' ? 'bg-gray-300' : 'bg-white'} `}
className={`p-6 rounded shadow-lg w-full max-w-sm border-2 ${theme === 'dark' ? 'bg-gray-300' : 'bg-white'}`}
>
<h1 className="text-xl font-bold mb-4 text-black ">Add Food Item</h1>
<h1 className="text-xl font-bold mb-4 text-black">Add Food Item</h1>

<div className="mb-4">
<label className="block text-gray-700">Dish Name</label>
<input
Expand Down Expand Up @@ -137,7 +138,7 @@ function AddFoodItem() {
name="mealType"
value={formData.mealType}
onChange={handleChange}
className="w-full p-2 border border-gray-300 rounded mt-1"
className="w-full p-2 border border-gray-300 rounded mt-1 text-black "
required
>
<option value="" disabled hidden>
Expand Down
2 changes: 2 additions & 0 deletions src/pages/SectionPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { ThemeContext } from "../themeContext";
import { FaRegEdit } from "react-icons/fa";
import { CiBoxList } from "react-icons/ci";
import { IoMdAdd } from "react-icons/io";

const SectionPage = () => {
const { _id } = useParams();
const navigate = useNavigate();
Expand Down Expand Up @@ -74,6 +75,7 @@ const SectionPage = () => {
} min-h-screen pt-[8rem]`}
>
<Navbar />

<div className="relative bg-white">

{loading ? (
Expand Down

0 comments on commit 478de21

Please sign in to comment.