diff --git a/src/components/taskDetails/Details.tsx b/src/components/taskDetails/Details.tsx index 273ceda0c..b8ff42c1c 100644 --- a/src/components/taskDetails/Details.tsx +++ b/src/components/taskDetails/Details.tsx @@ -86,8 +86,6 @@ const Details: FC = (props) => { const gitHubIssueLink = isGitHubLink ? value : undefined; const [newEndOnDate, setNewEndOnDate] = useState(''); const { isUserAuthorized } = useUserData(); - const router = useRouter(); - const isDevFlagEnabled = router.query.dev === 'true'; useEffect(() => { if (!isEditing) setNewEndOnDate(''); @@ -159,7 +157,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 +168,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); }); }