Skip to content

Commit

Permalink
fix: category
Browse files Browse the repository at this point in the history
  • Loading branch information
iamtrazy committed Jul 17, 2024
1 parent fb37793 commit fecda7e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/components/BranchManager/Forms/DynamicForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { XMarkIcon } from '@heroicons/react/24/outline';
import { TrashIcon } from '@heroicons/react/24/solid';
import ImageInput from '@components/BranchManager/Inputs/ImageInput';
import { Button } from '@nextui-org/react';
import MultiSelect from '../MultiSelect';
import MultiSelect from '@components/BranchManager/Forms/MultiSelect';
import { Category } from '@/types/category';
import { toast } from 'react-toastify';

Expand Down Expand Up @@ -119,7 +119,6 @@ const DynamicForm: FC = () => {

if (response.ok) {
toast('Food item added successfully', { type: 'success' });
// Optionally reset form values or handle navigation
} else {
toast('Failed to add food item', { type: 'error' });
console.error('Failed to add food item:', response.statusText);
Expand All @@ -131,9 +130,9 @@ const DynamicForm: FC = () => {
};

const [categories] = useState<Category[]>([
{ key: 'Dog', label: 'Dog' },
{ key: 'Cat', label: 'Cat' },
{ key: 'Bird', label: 'Bird' },
{ key: 'Non-Vegetarian', label: 'Non-Vegetarian' },
{ key: 'Vegetarian', label: 'Vegetarian' },
{ key: 'Other', label: 'Other' },
]);

return (
Expand Down

0 comments on commit fecda7e

Please sign in to comment.