diff --git a/ui/dashboard/src/App.tsx b/ui/dashboard/src/App.tsx index c04e459b2d..dcc1202ded 100644 --- a/ui/dashboard/src/App.tsx +++ b/ui/dashboard/src/App.tsx @@ -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"; @@ -19,7 +19,7 @@ const Dashboards = ({ analyticsContext, breakpointContext, themeContext }) => ( > - + diff --git a/ui/dashboard/src/components/dashboards/DashboardErrorModal/index.tsx b/ui/dashboard/src/components/dashboards/DashboardErrorModal/index.tsx deleted file mode 100644 index 67b010d141..0000000000 --- a/ui/dashboard/src/components/dashboards/DashboardErrorModal/index.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import ErrorModal from "../../Modal/ErrorModal"; -import { useDashboard } from "../../../hooks/useDashboard"; - -interface DashboardErrorModalProps { - error: any; -} - -const DashboardErrorModal = ({ error }: DashboardErrorModalProps) => ( - -); - -const DashboardErrorModalWrapper = () => { - const { error } = useDashboard(); - if (!error) { - return null; - } - return ; -}; - -export default DashboardErrorModalWrapper; diff --git a/ui/dashboard/src/components/dashboards/WorkspaceErrorModal/index.tsx b/ui/dashboard/src/components/dashboards/WorkspaceErrorModal/index.tsx new file mode 100644 index 0000000000..5f6b5acc3c --- /dev/null +++ b/ui/dashboard/src/components/dashboards/WorkspaceErrorModal/index.tsx @@ -0,0 +1,20 @@ +import ErrorModal from "../../Modal/ErrorModal"; +import { useDashboard } from "../../../hooks/useDashboard"; + +interface WorkspaceErrorModalProps { + error: any; +} + +const WorkspaceErrorModal = ({ error }: WorkspaceErrorModalProps) => ( + +); + +const WorkspaceErrorModalWrapper = () => { + const { error } = useDashboard(); + if (!error) { + return null; + } + return ; +}; + +export default WorkspaceErrorModalWrapper;