import React, { useState } from "react"; // component import { CustomSelect, ToggleSwitch } from "components/ui"; import { SelectMonthModal } from "components/automation"; // icon import { ArchiveRestore } from "lucide-react"; // constants import { PROJECT_AUTOMATION_MONTHS } from "constants/project"; // types import { IProject } from "types"; type Props = { projectDetails: IProject | undefined; handleChange: (formData: Partial) => Promise; }; export const AutoArchiveAutomation: React.FC = ({ projectDetails, handleChange }) => { const [monthModal, setmonthModal] = useState(false); const initialValues: Partial = { archive_in: 1 }; return ( <> setmonthModal(false)} handleChange={handleChange} />

Auto-archive closed issues

Plane will auto archive issues that have been completed or canceled.

projectDetails?.archive_in === 0 ? handleChange({ archive_in: 1 }) : handleChange({ archive_in: 0 }) } size="sm" />
{projectDetails?.archive_in !== 0 && (
Auto-archive issues that are closed for
{ handleChange({ archive_in: val }); }} input verticalPosition="bottom" width="w-full" > <> {PROJECT_AUTOMATION_MONTHS.map((month) => ( {month.label} ))}
)}
); };