Skip to content

Commit

Permalink
Revert "add city when send request"
Browse files Browse the repository at this point in the history
This reverts commit c778681.

by mistake i pushed wrong thing this branch and now i reverted them
  • Loading branch information
Celestin25 committed Nov 5, 2024
1 parent c778681 commit d76032e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
6 changes: 1 addition & 5 deletions src/Components/VendorRequestForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ const VendorRequestForm = ({
const toastId = toast.loading("Sending Request");

try {
const [city, sector] = formData.address.split(",").map((part) => part.trim());

const newAddress = { city, sector };
const updatedFormData = { ...formData, address: newAddress };
const res = await requestFn({ ...formData, address: newAddress });
const res = await requestFn(formData);
if (res.error) {
throw new Error(res?.error?.data?.message as string);
}
Expand Down
8 changes: 1 addition & 7 deletions src/Components/dashboard/RequestTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ interface SellerData {
storeName: string;
address: {
city: string;
sector: string
};
TIN: string;

}

interface SellerTableProps {
Expand Down Expand Up @@ -166,16 +164,12 @@ const RequestsTable: React.FC<SellerTableProps> = ({
<div className="z-80 fixed top-0 left-0 w-full h-full flex items-center justify-center bg-gray-800 bg-opacity-50">
<div className="bg-white rounded-lg shadow-lg p-4 max-w-sm w-full">
<h2 className="text-lg font-semibold mb-4">Seller Details</h2>

<p>
<strong>Store name:</strong> {selectedSeller.storeName}
<strong>Store Name:</strong> {selectedSeller.storeName}
</p>
<p>
<strong>City:</strong> {selectedSeller.address.city}
</p>
<p>
<strong>District:</strong> {selectedSeller.address.sector}
</p>
<p>
<strong>TIN:</strong> {selectedSeller.TIN}
</p>
Expand Down

0 comments on commit d76032e

Please sign in to comment.