This commit is contained in:
Abhishek Kumar 2026-02-18 13:16:49 +05:30
parent fe4ea648e4
commit 9ce5a8e5e2
39 changed files with 338 additions and 758 deletions

View file

@ -15,8 +15,6 @@ import {
TableHeader,
TableRow,
} from "@/components/ui/table";
import { useUserConfig } from '@/context/UserConfigContext';
interface Workflow {
id: number;
name: string;
@ -32,7 +30,6 @@ interface WorkflowTableProps {
export function WorkflowTable({ workflows, showArchived }: WorkflowTableProps) {
const router = useRouter();
const { accessToken } = useUserConfig();
const [isPending, startTransition] = useTransition();
const [loadingWorkflowId, setLoadingWorkflowId] = useState<number | null>(null);
@ -41,11 +38,6 @@ export function WorkflowTable({ workflows, showArchived }: WorkflowTableProps) {
};
const handleArchiveToggle = async (id: number, currentStatus: string) => {
if (!accessToken) {
toast.error('Authentication required');
return;
}
const newStatus = currentStatus === 'active' ? 'archived' : 'active';
const action = currentStatus === 'active' ? 'Archive' : 'Restore';
@ -59,9 +51,6 @@ export function WorkflowTable({ workflows, showArchived }: WorkflowTableProps) {
body: {
status: newStatus,
},
headers: {
'Authorization': `Bearer ${accessToken}`,
},
});
if (response.data) {