Skip to content

Commit

Permalink
Rename dashboard error modal to "Workspace error" to better suit its …
Browse files Browse the repository at this point in the history
…usage #2742.
  • Loading branch information
MichaelBurgess committed Nov 12, 2022
1 parent 4297959 commit f59beee
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions ui/dashboard/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import "./utils/registerComponents";
import Dashboard from "./components/dashboards/layout/Dashboard";
import DashboardErrorModal from "./components/dashboards/DashboardErrorModal";
import DashboardHeader from "./components/DashboardHeader";
import DashboardList from "./components/DashboardList";
import SnapshotHeader from "./components/SnapshotHeader";
import useAnalytics from "./hooks/useAnalytics";
import WorkspaceErrorModal from "./components/dashboards/WorkspaceErrorModal";
import { DashboardProvider } from "./hooks/useDashboard";
import { FullHeightThemeWrapper, useTheme } from "./hooks/useTheme";
import { Route, Routes } from "react-router-dom";
Expand All @@ -19,7 +19,7 @@ const Dashboards = ({ analyticsContext, breakpointContext, themeContext }) => (
>
<DashboardHeader />
<SnapshotHeader />
<DashboardErrorModal />
<WorkspaceErrorModal />
<DashboardList wrapperClassName="p-4 h-full overflow-y-auto" />
<Dashboard />
</DashboardProvider>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import ErrorModal from "../../Modal/ErrorModal";
import { useDashboard } from "../../../hooks/useDashboard";

interface WorkspaceErrorModalProps {
error: any;
}

const WorkspaceErrorModal = ({ error }: WorkspaceErrorModalProps) => (
<ErrorModal error={error} title="Workspace Error" />
);

const WorkspaceErrorModalWrapper = () => {
const { error } = useDashboard();
if (!error) {
return null;
}
return <WorkspaceErrorModal error={error} />;
};

export default WorkspaceErrorModalWrapper;

0 comments on commit f59beee

Please sign in to comment.