import { Alert } from "@mui/lab"; import { CircularProgress, List } from "@mui/material"; import React from "react"; import RuleListItem from "./RuleListItem"; import { useScopeQuery } from "lib/graphql/generated"; function Rules(): JSX.Element { const { loading, error, data } = useScopeQuery(); return (
{loading && } {error && Error fetching scope: {error.message}} {data && data.scope.length > 0 && ( {data.scope.map((rule, index) => ( ))} )}
); } export default Rules;