Skip to content

Commit

Permalink
feat: Catch graph error in boundary
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Sep 17, 2024
1 parent a53711e commit b39f801
Show file tree
Hide file tree
Showing 12 changed files with 73 additions and 83 deletions.
22 changes: 2 additions & 20 deletions editor.planx.uk/src/@planx/components/MapAndLabel/Public/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import Tab, { tabClasses, TabProps } from "@mui/material/Tab";
import Tabs from "@mui/material/Tabs";
import Typography from "@mui/material/Typography";
import { SiteAddress } from "@planx/components/FindProperty/model";
import { ErrorSummaryContainer } from "@planx/components/shared/Preview/ErrorSummaryContainer";
import { SchemaFields } from "@planx/components/shared/Schema/SchemaFields";
import { GraphError } from "components/Error/GraphError";
import { GeoJsonObject } from "geojson";
import sortBy from "lodash/sortBy";
import { useStore } from "pages/FlowEditor/lib/store";
Expand Down Expand Up @@ -305,32 +305,14 @@ export const Presentational: React.FC<PresentationalProps> = (props) => (
</MapAndLabelProvider>
);

const GraphError = (props: Props) => (
<Card handleSubmit={props.handleSubmit} isValid>
<CardHeader title={props.title} description={props.description} />
<ErrorSummaryContainer
role="status"
data-testid="error-summary-invalid-graph"
>
<Typography variant="h4" component="h2" gutterBottom>
Invalid graph
</Typography>
<Typography variant="body2">
Edit this flow so that "MapAndLabel" is positioned after "FindProperty";
an initial address is required to correctly display the map.
</Typography>
</ErrorSummaryContainer>
</Card>
);

function MapAndLabelComponent(props: Props) {
const teamSettings = useStore.getState().teamSettings;
const passport = useStore((state) => state.computePassport());
const { latitude, longitude } =
(passport?.data?._address as SiteAddress) || {};

if (!latitude || !longitude) {
return <GraphError {...props} />;
throw new GraphError("nodeMustFollowFindProperty");
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Card from "@planx/components/shared/Preview/Card";
import CardHeader from "@planx/components/shared/Preview/CardHeader";
import type { PublicProps } from "@planx/components/ui";
import DelayedLoadingIndicator from "components/DelayedLoadingIndicator";
import { GraphError } from "components/Error/GraphError";
import capitalize from "lodash/capitalize";
import { useStore } from "pages/FlowEditor/lib/store";
import { HandleSubmit } from "pages/Preview/Node";
Expand Down Expand Up @@ -63,6 +64,8 @@ function Component(props: Props) {

// PlanningConstraints must come after at least a FindProperty in the graph
const showGraphError = !x || !y || !longitude || !latitude;
if (showGraphError)
throw new GraphError("mapInputFieldMustFollowFindProperty");

Check failure on line 68 in editor.planx.uk/src/@planx/components/PlanningConstraints/Public.tsx

View workflow job for this annotation

GitHub Actions / Run React Tests

src/@planx/components/PlanningConstraints/Public.test.tsx > renders correctly

{ stack: 'Error: \n' + ' at Component (/home/runner/work/planx-new/planx-new/editor.planx.uk/src/@planx/components/PlanningConstraints/Public.tsx:68:11)\n' + ' at renderWithHooks (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:16305:18)\n' + ' at mountIndeterminateComponent (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:20074:13)\n' + ' at beginWork (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:21587:16)\n' + ' at beginWork$1 (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:27426:14)\n' + ' at performUnitOfWork (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26560:12)\n' + ' at workLoopSync (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26466:5)\n' + ' at renderRootSync (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26434:7)\n' + ' at recoverFromConcurrentError (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25850:20)\n' + ' at performConcurrentWorkOnRoot (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25750:22)', type: 'mapInputFieldMustFollowFindProperty', stackStr: 'Error: \n' + ' at Component (/home/runner/work/planx-new/planx-new/editor.planx.uk/src/@planx/components/PlanningConstraints/Public.tsx:68:11)\n' + ' at renderWithHooks (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:16305:18)\n' + ' at mountIndeterminateComponent (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:20074:13)\n' + ' at beginWork (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:21587:16)\n' + ' at beginWork$1 (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:27426:14)\n' + ' at performUnitOfWork (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26560:12)\n' + ' at workLoopSync (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26466:5)\n' + ' at renderRootSync (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26434:7)\n' + ' at recoverFromConcurrentError (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25850:20)\n' + ' at performConcurrentWorkOnRoot (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25750:22)', nameStr: 'Error', expected: 'undefined', actual: 'undefined', message: '', constructor

Check failure on line 68 in editor.planx.uk/src/@planx/components/PlanningConstraints/Public.tsx

View workflow job for this annotation

GitHub Actions / Run React Tests

src/@planx/components/PlanningConstraints/Public.test.tsx > should not have any accessibility violations

{ stack: 'Error: \n' + ' at Component (/home/runner/work/planx-new/planx-new/editor.planx.uk/src/@planx/components/PlanningConstraints/Public.tsx:68:11)\n' + ' at renderWithHooks (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:16305:18)\n' + ' at mountIndeterminateComponent (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:20074:13)\n' + ' at beginWork (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:21587:16)\n' + ' at beginWork$1 (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:27426:14)\n' + ' at performUnitOfWork (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26560:12)\n' + ' at workLoopSync (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26466:5)\n' + ' at renderRootSync (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26434:7)\n' + ' at recoverFromConcurrentError (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25850:20)\n' + ' at performConcurrentWorkOnRoot (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25750:22)', type: 'mapInputFieldMustFollowFindProperty', stackStr: 'Error: \n' + ' at Component (/home/runner/work/planx-new/planx-new/editor.planx.uk/src/@planx/components/PlanningConstraints/Public.tsx:68:11)\n' + ' at renderWithHooks (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:16305:18)\n' + ' at mountIndeterminateComponent (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:20074:13)\n' + ' at beginWork (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:21587:16)\n' + ' at beginWork$1 (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:27426:14)\n' + ' at performUnitOfWork (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26560:12)\n' + ' at workLoopSync (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26466:5)\n' + ' at renderRootSync (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26434:7)\n' + ' at recoverFromConcurrentError (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25850:20)\n' + ' at performConcurrentWorkOnRoot (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25750:22)', nameStr: 'Error', expected: 'undefined', actual: 'undefined', message: '', constructor

// Even though this component will fetch fresh GIS data when coming "back",
// still prepopulate any previously marked inaccurateConstraints
Expand Down Expand Up @@ -145,8 +148,6 @@ function Component(props: Props) {
...roads?.metadata,
};

if (showGraphError) return <ConstraintsGraphError {...props} />;

const isLoading = isValidating || isValidatingRoads;
if (isLoading)
return (
Expand Down Expand Up @@ -396,28 +397,3 @@ const ConstraintsFetchError = (props: ConstraintsFetchErrorProps) => (
</ErrorSummaryContainer>
</Card>
);

interface ConstraintsGraphErrorProps {
title: string;
description: string;
handleSubmit?: HandleSubmit;
}

const ConstraintsGraphError = (props: ConstraintsGraphErrorProps) => (
<Card handleSubmit={props.handleSubmit} isValid>
<CardHeader title={props.title} description={props.description} />
<ErrorSummaryContainer
role="status"
data-testid="error-summary-invalid-graph"
>
<Typography variant="h4" component="h2" gutterBottom>
Invalid graph
</Typography>
<Typography variant="body2">
Edit this flow so that "Planning constraints" is positioned after "Find
property"; an address or site boundary drawing is required to fetch
data.
</Typography>
</ErrorSummaryContainer>
</Card>
);
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { useQuery } from "@apollo/client";
import Box from "@mui/material/Box";
import Link from "@mui/material/Link";
import Typography from "@mui/material/Typography";
import { visuallyHidden } from "@mui/utils";
import Card from "@planx/components/shared/Preview/Card";
import CardHeader from "@planx/components/shared/Preview/CardHeader";
import { SummaryListTable } from "@planx/components/shared/Preview/SummaryList";
import type { PublicProps } from "@planx/components/ui";
import { GraphError } from "components/Error/GraphError";
import { Feature } from "geojson";
import { publicClient } from "lib/graphql";
import find from "lodash/find";
Expand All @@ -17,7 +17,6 @@ import React from "react";

import type { SiteAddress } from "../FindProperty/model";
import { FETCH_BLPU_CODES } from "../FindProperty/Public";
import { ErrorSummaryContainer } from "../shared/Preview/ErrorSummaryContainer";
import { MapContainer } from "../shared/Preview/MapContainer";
import type { PropertyInformation } from "./model";

Expand All @@ -32,7 +31,10 @@ function Component(props: PublicProps<PropertyInformation>) {
client: publicClient,
});

return passport.data?._address ? (
if (!passport.data?._address)
throw new GraphError("nodeMustFollowFindProperty");

Check failure on line 35 in editor.planx.uk/src/@planx/components/PropertyInformation/Public.tsx

View workflow job for this annotation

GitHub Actions / Run React Tests

src/@planx/components/PropertyInformation/Public.test.tsx > renders a warning for editors if address data is not in state

{ stack: 'Error: \n' + ' at Component (/home/runner/work/planx-new/planx-new/editor.planx.uk/src/@planx/components/PropertyInformation/Public.tsx:35:11)\n' + ' at renderWithHooks (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:16305:18)\n' + ' at mountIndeterminateComponent (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:20074:13)\n' + ' at beginWork (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:21587:16)\n' + ' at beginWork$1 (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:27426:14)\n' + ' at performUnitOfWork (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26560:12)\n' + ' at workLoopSync (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26466:5)\n' + ' at renderRootSync (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26434:7)\n' + ' at recoverFromConcurrentError (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25850:20)\n' + ' at performConcurrentWorkOnRoot (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25750:22)', type: 'nodeMustFollowFindProperty', stackStr: 'Error: \n' + ' at Component (/home/runner/work/planx-new/planx-new/editor.planx.uk/src/@planx/components/PropertyInformation/Public.tsx:35:11)\n' + ' at renderWithHooks (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:16305:18)\n' + ' at mountIndeterminateComponent (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:20074:13)\n' + ' at beginWork (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:21587:16)\n' + ' at beginWork$1 (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:27426:14)\n' + ' at performUnitOfWork (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26560:12)\n' + ' at workLoopSync (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26466:5)\n' + ' at renderRootSync (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26434:7)\n' + ' at recoverFromConcurrentError (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25850:20)\n' + ' at performConcurrentWorkOnRoot (/home/runner/work/planx-new/planx-new/editor.planx.uk/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25750:22)', nameStr: 'Error', expected: 'undefined', actual: 'undefined', message: '', constructor: 'Functi

return (
<Presentational
title={props.title}
description={props.description}
Expand Down Expand Up @@ -60,21 +62,6 @@ function Component(props: PublicProps<PropertyInformation>) {
});
}}
/>
) : (
<Card>
<ErrorSummaryContainer
role="status"
data-testid="error-summary-invalid-graph"
>
<Typography variant="h4" component="h2" gutterBottom>
Invalid graph
</Typography>
<Typography variant="body2">
Edit this flow so that "Property information" is positioned after
"Find property"; an address is required to render.
</Typography>
</ErrorSummaryContainer>
</Card>
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Box from "@mui/material/Box";
import { SiteAddress } from "@opensystemslab/planx-core/types";
import { MapContainer } from "@planx/components/shared/Preview/MapContainer";
import type { MapField } from "@planx/components/shared/Schema/model";
import { GraphError } from "components/Error/GraphError";
import { Feature } from "geojson";
import { useStore } from "pages/FlowEditor/lib/store";
import React, { useEffect, useState } from "react";
Expand All @@ -18,12 +19,8 @@ export const MapFieldInput: React.FC<Props<MapField>> = (props) => {
(state.computePassport()?.data?.["_address"] as SiteAddress) || {},
);

if (!longitude || !latitude) {
throw Error(
'Edit this flow so that this component is positioned after "FindProperty"; an address is required for schemas that include a "map" field.',
{ cause: "Invalid graph" },
);
}
if (!longitude || !latitude)
throw new GraphError("mapInputFieldMustFollowFindProperty");

const {
formik,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,24 @@ import Card from "@planx/components/shared/Preview/Card";
import { ErrorSummaryContainer } from "@planx/components/shared/Preview/ErrorSummaryContainer";
import React from "react";

import { logger } from "../airbrake";
import { logger } from "../../airbrake";
import { GraphErrorComponent, isGraphError } from "./GraphError";

function ErrorFallback(props: { error: Error }) {
logger.notify(props.error);
const ErrorFallback: React.FC<{ error: Error }> = ({ error }) => {
if (isGraphError(error)) return <GraphErrorComponent error={error} />;

logger.notify(error);

return (
<Card>
<ErrorSummaryContainer role="alert">
<Typography variant="h4" component="h1" gutterBottom>
{(props.error.cause as string) || "Something went wrong"}
Something went wrong
</Typography>
<Typography>
{props.error?.message && (
{error.message && (
<pre style={{ color: "#E91B0C", whiteSpace: "pre-line" }}>
{props.error.message}
{error.message}
</pre>
)}
</Typography>
Expand All @@ -27,6 +30,6 @@ function ErrorFallback(props: { error: Error }) {
</ErrorSummaryContainer>
</Card>
);
}
};

export default ErrorFallback;
45 changes: 45 additions & 0 deletions editor.planx.uk/src/components/Error/GraphError.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import Typography from "@mui/material/Typography";
import Card from "@planx/components/shared/Preview/Card";
import CardHeader from "@planx/components/shared/Preview/CardHeader";
import { ErrorSummaryContainer } from "@planx/components/shared/Preview/ErrorSummaryContainer";
import React from "react";

type GraphErrorType =
| "nodeMustFollowFindProperty"
| "mapInputFieldMustFollowFindProperty";

const GRAPH_ERROR_MESSAGES: Record<GraphErrorType, string> = {
nodeMustFollowFindProperty:
'Edit this flow so that this node is positioned after "Find property"; an address or site boundary drawing is required to fetch data',
mapInputFieldMustFollowFindProperty:
'Edit this flow so that this component is positioned after "FindProperty"; an address is required for schemas that include a "map" field.',
};

export class GraphError extends Error {
constructor(public type: GraphErrorType) {
super();
this.type = type;
}
}

export const isGraphError = (error: unknown): error is GraphError =>
error instanceof GraphError;

export const GraphErrorComponent: React.FC<{ error: GraphError }> = ({
error,
}) => (
<Card>
<CardHeader />
<ErrorSummaryContainer
role="status"
data-testid="error-summary-invalid-graph"
>
<Typography variant="h4" component="h2" gutterBottom>
Invalid graph
</Typography>
<Typography variant="body2">
{GRAPH_ERROR_MESSAGES[error.type]}
</Typography>
</ErrorSummaryContainer>
</Card>
);
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import TableHead from "@mui/material/TableHead";
import TableRow from "@mui/material/TableRow";
import Typography from "@mui/material/Typography";
import DelayedLoadingIndicator from "components/DelayedLoadingIndicator";
import ErrorFallback from "components/ErrorFallback";
import ErrorFallback from "components/Error/ErrorFallback";
import { format } from "date-fns";
import React, { useState } from "react";
import ErrorSummary from "ui/shared/ErrorSummary";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import IconButton from "@mui/material/IconButton";
import { styled } from "@mui/material/styles";
import { ComponentType as TYPES } from "@opensystemslab/planx-core/types";
import { parseFormValues } from "@planx/components/shared";
import ErrorFallback from "components/ErrorFallback";
import ErrorFallback from "components/Error/ErrorFallback";
import { hasFeatureFlag } from "lib/featureFlags";
import React from "react";
import { ErrorBoundary } from "react-error-boundary";
Expand Down
2 changes: 1 addition & 1 deletion editor.planx.uk/src/pages/Preview/Questions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import React, { useCallback, useEffect, useMemo, useState } from "react";
import { ErrorBoundary } from "react-error-boundary";
import { ApplicationPath, Session } from "types";

import ErrorFallback from "../../components/ErrorFallback";
import ErrorFallback from "../../components/Error/ErrorFallback";
import { useStore } from "../FlowEditor/lib/store";
import Node, { HandleSubmit } from "./Node";

Expand Down
2 changes: 1 addition & 1 deletion editor.planx.uk/src/pages/layout/FlowEditorLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ErrorFallback from "components/ErrorFallback";
import ErrorFallback from "components/Error/ErrorFallback";
import FlowEditor from "pages/FlowEditor";
import React, { PropsWithChildren } from "react";
import { ErrorBoundary } from "react-error-boundary";
Expand Down
2 changes: 1 addition & 1 deletion editor.planx.uk/src/pages/layout/PublicLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
ThemeProvider,
} from "@mui/material/styles";
import Typography from "@mui/material/Typography";
import ErrorFallback from "components/ErrorFallback";
import ErrorFallback from "components/Error/ErrorFallback";
import Feedback from "components/Feedback";
import { useStore } from "pages/FlowEditor/lib/store";
import React, { PropsWithChildren } from "react";
Expand Down

0 comments on commit b39f801

Please sign in to comment.