Skip to content

Commit d76032e

Browse files
committed
Revert "add city when send request"
This reverts commit c778681. by mistake i pushed wrong thing this branch and now i reverted them
1 parent c778681 commit d76032e

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

src/Components/VendorRequestForm.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@ const VendorRequestForm = ({
4040
const toastId = toast.loading("Sending Request");
4141

4242
try {
43-
const [city, sector] = formData.address.split(",").map((part) => part.trim());
44-
45-
const newAddress = { city, sector };
46-
const updatedFormData = { ...formData, address: newAddress };
47-
const res = await requestFn({ ...formData, address: newAddress });
43+
const res = await requestFn(formData);
4844
if (res.error) {
4945
throw new Error(res?.error?.data?.message as string);
5046
}

src/Components/dashboard/RequestTable.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ interface SellerData {
1111
storeName: string;
1212
address: {
1313
city: string;
14-
sector: string
1514
};
1615
TIN: string;
17-
1816
}
1917

2018
interface SellerTableProps {
@@ -166,16 +164,12 @@ const RequestsTable: React.FC<SellerTableProps> = ({
166164
<div className="z-80 fixed top-0 left-0 w-full h-full flex items-center justify-center bg-gray-800 bg-opacity-50">
167165
<div className="bg-white rounded-lg shadow-lg p-4 max-w-sm w-full">
168166
<h2 className="text-lg font-semibold mb-4">Seller Details</h2>
169-
170167
<p>
171-
<strong>Store name:</strong> {selectedSeller.storeName}
168+
<strong>Store Name:</strong> {selectedSeller.storeName}
172169
</p>
173170
<p>
174171
<strong>City:</strong> {selectedSeller.address.city}
175172
</p>
176-
<p>
177-
<strong>District:</strong> {selectedSeller.address.sector}
178-
</p>
179173
<p>
180174
<strong>TIN:</strong> {selectedSeller.TIN}
181175
</p>

0 commit comments

Comments
 (0)