< Summary

Information
Class: locations.tsx
Assembly: app.routes
File(s): /home/runner/work/ClutterStock/ClutterStock/frontend/app/routes/locations.tsx
Tag: 58_25416222083
Line coverage
0%
Covered lines: 0
Uncovered lines: 2
Coverable lines: 2
Total lines: 23
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

File(s)

/home/runner/work/ClutterStock/ClutterStock/frontend/app/routes/locations.tsx

#LineLine coverage
 1import { Link } from "react-router";
 2import type { Route } from "./+types/locations";
 3import { LocationsLayout } from "~/components/locations";
 4import { ProblemBoundary } from "~/components/problem-boundary";
 5
 6export default LocationsLayout;
 7
 08export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
 9  // RR7 swaps the parent's element for this boundary when a nested route throws,
 10  // so we re-render the layout chrome here to keep the active data-theme,
 11  // page header, and "Add location" entry point intact.
 012  return (
 13    <main className="page-main">
 14      <div className="page-header">
 15        <h1 className="page-title">Locations</h1>
 16        <Link to="/locations/new" className="btn-primary">
 17          + Add location
 18        </Link>
 19      </div>
 20      <ProblemBoundary error={error} scope="section" />
 21    </main>
 22  );
 23}

Methods/Properties

ErrorBoundary()V