);
-}
\ No newline at end of file
+}
diff --git a/src/components/Brand/addBrand.tsx b/src/components/Brand/addBrand.tsx
new file mode 100644
index 0000000..747d4eb
--- /dev/null
+++ b/src/components/Brand/addBrand.tsx
@@ -0,0 +1,38 @@
+"use client";
+import { ChangeEvent, FC, useState } from "react";
+interface Props {
+ createBrand: (value: string) => void;
+}
+const AddBrand: FC = ({ createBrand }) => {
+ // State for handling input value
+ const [input, setInput] = useState("");
+ // Event handler for input change
+ const handleInput = (e: ChangeEvent) => {
+ setInput(e.target.value);
+ };
+ // Event handler for adding a new brand
+ const handleAdd = async () => {
+ createBrand(input);
+ setInput("");
+ };
+ // Rendering the AddBrand component
+ return (
+
+ {/* Input field for entering new brand text */}
+
+ {/* Button for adding a new brand */}
+
+
+ );
+};
+export default AddBrand;
\ No newline at end of file
diff --git a/src/components/Brand/brand.tsx b/src/components/Brand/brand.tsx
new file mode 100644
index 0000000..7064a5c
--- /dev/null
+++ b/src/components/Brand/brand.tsx
@@ -0,0 +1,92 @@
+"use client";
+import { ChangeEvent, FC, useState } from "react";
+import { brandType } from "../../types/brandType";
+interface Props {
+ brand: brandType;
+ changeBrandName: (id: number, name: string) => void;
+
+ deleteBrand: (id: number) => void;
+}
+const Brand: FC = ({
+ brand,
+ changeBrandName,
+ deleteBrand,
+}) => {
+ // State for handling editing mode
+ const [editing, setEditing] = useState(false);
+ // State for handling text input
+ const [name, setName] = useState(brand.name);
+ // Event handler for text input change
+ const handleNameChange = (e: ChangeEvent) => {
+ setName(e.target.value);
+ };
+ // Event handler for initiating the edit mode
+ const handleEdit = () => {
+ setEditing(true);
+ };
+ // Event handler for saving the edited text
+ const handleSave = async () => {
+ changeBrandName(brand.id, name);
+ setEditing(false);
+ };
+ // Event handler for canceling the edit mode
+ const handleCancel = () => {
+ setEditing(false);
+ setName(brand.name);
+ };
+ // Event handler for deleting a todo item
+ const handleDelete = () => {
+ if (confirm("Are you sure you want to delete this brand?")) {
+ deleteBrand(brand.id);
+ }
+ };
+ // Rendering the Todo component
+ return (
+
+ {/* Checkbox for marking the todo as done */}
+
+ {/* Input field for brand text */}
+
+ {/* Action buttons for editing, saving, canceling, and deleting */}
+