• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cartesi / rollups-explorer / 16284459447

14 Jul 2025 11:53PM UTC coverage: 88.189% (+0.08%) from 88.107%
16284459447

push

github

web-flow
chore: Upgrade dependencies (#362)

1679 of 1943 branches covered (86.41%)

Branch coverage included in aggregate %.

11373 of 12857 relevant lines covered (88.46%)

62.24 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

2.78
/apps/web/src/components/specification/SpecificationContainer.tsx
1
"use client";
1✔
2
import { Center, Loader } from "@mantine/core";
×
3
import { useRouter } from "next/navigation";
×
4
import { isNotNilOrEmpty } from "ramda-adjunct";
×
5
import { FC, useCallback } from "react";
×
6
import {
×
7
    SpecificationFormView,
8
    SpecificationFormViewOnSuccess,
9
} from "./SpecificationFormView";
10
import { EditSpecificationNotFound } from "./components/EditSpecificationNotFound";
×
11
import { useSpecification } from "./hooks/useSpecification";
×
12
import { Specification } from "./types";
13

14
interface ContainerProps {
15
    specificationId?: Specification["id"];
16
}
17

18
export const SpecificationContainer: FC<ContainerProps> = ({
×
19
    specificationId,
×
20
}) => {
×
21
    const router = useRouter();
×
22
    const { getSpecification, fetching } = useSpecification();
×
23
    const foundSpecification = getSpecification(specificationId!);
×
24

25
    const displayLoader = isNotNilOrEmpty(specificationId) && fetching;
×
26
    const showNotFoundSpec =
×
27
        isNotNilOrEmpty(specificationId) && !fetching && !foundSpecification;
×
28

29
    const onSuccess: SpecificationFormViewOnSuccess = useCallback(
×
30
        ({ formMode }) => {
×
31
            if (formMode === "EDITION") router.push("/specifications");
×
32
        },
×
33
        [router],
×
34
    );
×
35

36
    if (displayLoader)
×
37
        return (
×
38
            <Center>
×
39
                <Loader />
×
40
            </Center>
×
41
        );
42

43
    if (showNotFoundSpec)
×
44
        return <EditSpecificationNotFound id={specificationId!} />;
×
45

46
    return (
×
47
        <SpecificationFormView
×
48
            specification={foundSpecification}
×
49
            onSuccess={onSuccess}
×
50
        />
×
51
    );
52
};
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc