Loading...
import { useState, useCallback, useEffect } from "react"; import { useParams, useNavigate } from "react-router"; import { Masthead } from "../components/Masthead"; import { ChainList } from "../components/chains/ChainList"; import { ChainEditor } from "../components/chains/ChainEditor"; import { useChains } from "../hooks/useChains"; import { useAuth } from "../contexts/AuthContext"; import type { ChainSummary, ChainWithContracts, ChainGraphResponse, CreateChainRequest, AddChainRepositoryRequest, RepositoryHistoryEntry, } from "../lib/api"; import { getRepositorySuggestions } from "../lib/api"; export default function ChainsPage() { const { isAuthenticated, isAuthConfigured, isLoading: authLoading } = useAuth(); const navigate = useNavigate(); // Redirect to login if not authenticated (when auth is configured) useEffect(() => { if (!authLoading && isAuthConfigured && !isAuthenticated) { navigate("/login"); } }, [authLoading, isAuthConfigured, isAuthenticated, navigate]); // Show loading while checking auth if (authLoading) { return (
Loading...
Select a chain or create a new one
Add repositories that contracts in this chain will work with
)}A chain links multiple contracts together in a DAG. Contracts depend on each other and start automatically when dependencies complete.
{/* Actions */}