Skip to content

Commit

Permalink
fix the cancel and add_rfp issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Megha-Dev-19 committed Aug 20, 2024
1 parent ff4c4ab commit 23a545a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion widget/components/rfps/Editor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ const [rfpIdsArray, setRfpIdsArray] = useState(null);
const [isTxnCreated, setCreateTxn] = useState(false);
const [oldRfpData, setOldRfpData] = useState(null);
const [timeline, setTimeline] = useState(null);
const [isCancelModalOpen, setCancelModal] = useState(false);

useEffect(() => {
if (!timeline) {
Expand Down Expand Up @@ -338,7 +339,11 @@ useEffect(() => {
setSummary(snapshot.summary);
setDescription(snapshot.description);
setSubmissionDeadline(getDate(snapshot.submission_deadline));
setTimeline(parseJSON(snapshot.timeline));
setTimeline(
Object.keys(parseJSON(snapshot.timeline))
? parseJSON(snapshot.timeline)
: { status: RFP_TIMELINE_STATUS.ACCEPTING_SUBMISSIONS },
);
if (isEditPage) {
setConsent({ toc: true, coc: true });
}
Expand Down

0 comments on commit 23a545a

Please sign in to comment.