Skip to content

Commit 733e55e

Browse files
authored
Merge pull request #36 from iranpsc/revert-34-feat/offers-tab
Revert "fix some bugs"
2 parents aee4292 + b2116fc commit 733e55e

2 files changed

Lines changed: 41 additions & 38 deletions

File tree

src/Pages/AccountSecurity/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const AccountSecurityModal = () => {
2121
const { sectionId } = location.state || {};
2222

2323
if (sectionId && ["send-suggestion", "received-suggestion"].includes(sectionId)) {
24+
console.log("Closing modal with ID:", selectedItemId);
2425

2526
setSectionId(sectionId);
2627
setAccountSecurity(true);

src/Pages/Profile/Tabs/suggestion-tab/recieved/Proposer.jsx

Lines changed: 40 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,13 @@ const Proposer = ({
130130
const navigate = useNavigate();
131131
const handleToggle = () => {
132132
setIsExpanded(!isExpanded);
133-
};const handleGracePeriod = async (selectedDay) => {
133+
};
134+
const handleGracePeriod = async (selectedDay) => {
134135
if (!id) return console.error("Error: id is undefined!");
136+
135137
try {
136-
const response = await Request(`buy-requests/add-grace-period/${id}`, "POST", JSON.stringify({ grace_period: selectedDay }), {
137-
headers: { "Content-Type": "application/json" },
138+
await Request(`buy-requests/add-grace-period/${id}`, "POST", new FormData().append("grace_period", selectedDay.toString()), {
139+
headers: { "Content-Type": "multipart/form-data" },
138140
}, "production");
139141
setDay(selectedDay);
140142
} catch (error) {
@@ -144,7 +146,7 @@ const Proposer = ({
144146
});
145147
}
146148
};
147-
149+
148150

149151
return (
150152
<Container>
@@ -247,48 +249,48 @@ const Proposer = ({
247249
height="100vh"
248250
width={400}
249251
style={{
250-
position: "absolute",
251-
left: "50%",
252-
top: "50%",
253-
transform: "translate(-50%, -50%)",
252+
position: "absolute",
253+
left: "50%",
254+
top: "50%",
255+
transform: "translate(-50%, -50%)",
254256
}}
255257
/>
256258

257259

258260
)}
259261
</RejectButton>
260-
<div style={{ position: "relative" }}>
261-
<Button
262-
label={getFieldTranslationByNames("776")}
263-
color="#18C08F"
264-
textColor="#FFFFFF"
265-
onClick={() => {
266-
setIsExplodingAccept(true);
267-
268-
onAccept();
269-
}}
270-
full
271-
/>
262+
<div style={{position:"relative"}}>
263+
<Button
264+
label={getFieldTranslationByNames("776")}
265+
color="#18C08F"
266+
textColor="#FFFFFF"
267+
onClick={() => {
268+
setIsExplodingAccept(true);
272269

273-
{isExplodingAccept && (
270+
onAccept();
271+
}}
272+
full
273+
/>
274274

275-
<ConfettiExplosion
276-
zIndex={10}
277-
particleCount={150}
278-
duration={3000}
279-
colors={["#18C08F"]}
280-
particleSize={5}
281-
height="100vh"
282-
width={400}
283-
style={{
284-
position: "absolute",
285-
left: "50%",
286-
top: "50%",
287-
transform: "translate(-50%, -50%)",
288-
}}
289-
/>
290-
)}
291-
</div>
275+
{isExplodingAccept && (
276+
277+
<ConfettiExplosion
278+
zIndex={10}
279+
particleCount={150}
280+
duration={3000}
281+
colors={["#18C08F"]}
282+
particleSize={5}
283+
height="100vh"
284+
width={400}
285+
style={{
286+
position: "absolute",
287+
left: "50%",
288+
top: "50%",
289+
transform: "translate(-50%, -50%)",
290+
}}
291+
/>
292+
)}
293+
</div>
292294
</Buttons>
293295
</ProposalStatus>
294296
</Container >

0 commit comments

Comments
 (0)