260228:1457 Fix blank workflow config page & deployment pipeline
Some checks failed
Build and Deploy / deploy (push) Failing after 4m2s
Some checks failed
Build and Deploy / deploy (push) Failing after 4m2s
This commit is contained in:
@@ -9,7 +9,7 @@ import { useWorkflowDefinitions } from '@/hooks/use-workflows';
|
||||
import { Workflow } from '@/types/workflow';
|
||||
|
||||
export default function WorkflowsPage() {
|
||||
const { data: workflows = [], isLoading: loading } = useWorkflowDefinitions();
|
||||
const { data: workflows = [], isLoading: loading, error } = useWorkflowDefinitions();
|
||||
|
||||
return (
|
||||
<div className="p-6 space-y-6">
|
||||
@@ -30,6 +30,14 @@ export default function WorkflowsPage() {
|
||||
<div className="flex justify-center py-12">
|
||||
<Loader2 className="h-8 w-8 animate-spin text-muted-foreground" />
|
||||
</div>
|
||||
) : error ? (
|
||||
<div className="text-center py-12 text-destructive border rounded-lg border-dashed border-destructive/50 bg-destructive/10">
|
||||
Failed to load workflows. Please try again later.
|
||||
</div>
|
||||
) : workflows.length === 0 ? (
|
||||
<div className="text-center py-12 text-muted-foreground border rounded-lg border-dashed">
|
||||
No workflow definitions found. Click "New Workflow" to create one.
|
||||
</div>
|
||||
) : (
|
||||
<div className="grid gap-4">
|
||||
{workflows.map((workflow: Workflow) => (
|
||||
|
||||
Reference in New Issue
Block a user