From 129ff7772d80d8259160d3557a763379b8620a0d Mon Sep 17 00:00:00 2001 From: ayushsanjdev Date: Sun, 20 Oct 2024 16:04:33 +0530 Subject: [PATCH] remove FF --- src/components/taskDetails/Details.tsx | 4 +--- src/components/taskDetails/index.tsx | 8 +++----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/components/taskDetails/Details.tsx b/src/components/taskDetails/Details.tsx index 273ceda0c..fb5693434 100644 --- a/src/components/taskDetails/Details.tsx +++ b/src/components/taskDetails/Details.tsx @@ -87,7 +87,6 @@ const Details: FC = (props) => { const [newEndOnDate, setNewEndOnDate] = useState(''); const { isUserAuthorized } = useUserData(); const router = useRouter(); - const isDevFlagEnabled = router.query.dev === 'true'; useEffect(() => { if (!isEditing) setNewEndOnDate(''); @@ -159,7 +158,6 @@ const Details: FC = (props) => { const renderedValue = value ?? 'N/A'; const dateValue = newEndOnDate || new Date(value as string).toLocaleDateString('en-CA'); - const finalDateValue = isDevFlagEnabled ? dateValue : newEndOnDate; return (
@@ -171,7 +169,7 @@ const Details: FC = (props) => { name="endsOn" onChange={(e) => setNewEndOnDate(e.target.value)} onBlur={handleEndsOnBlur} - value={finalDateValue} + value={dateValue} className={styles.inputField} /> ) : ( diff --git a/src/components/taskDetails/index.tsx b/src/components/taskDetails/index.tsx index dba5e867d..042265857 100755 --- a/src/components/taskDetails/index.tsx +++ b/src/components/taskDetails/index.tsx @@ -92,7 +92,6 @@ const TaskDetails: FC = ({ taskID }) => { ); const inputRef = useRef(null); const [showSuggestion, setShowSuggestion] = useState(false); - const isDevFlagEnabled = router.query.dev === 'true'; const handleAssignment = (e: React.ChangeEvent) => { setAssigneeName(e.target.value); @@ -141,7 +140,6 @@ const TaskDetails: FC = ({ taskID }) => { setEditedTaskDetails(taskDetailsData); } async function onSave() { - !isDevFlagEnabled && setIsEditing(false); const updatedFields: Partial = {}; for (const key in editedTaskDetails) { if ( @@ -164,7 +162,7 @@ const TaskDetails: FC = ({ taskID }) => { return; } - isDevFlagEnabled && setLoading(true); + setLoading(true); await updateTaskDetails({ editedDetails: updatedFields, taskID, @@ -173,8 +171,8 @@ const TaskDetails: FC = ({ taskID }) => { .then(() => toast(SUCCESS, 'Successfully saved')) .catch((error) => toast(ERROR, error.data.message)) .finally(() => { - isDevFlagEnabled && setIsEditing(false); - isDevFlagEnabled && setLoading(false); + setLoading(false); + setIsEditing(false); }); }