-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename dashboard error modal to "Workspace error" to better suit its …
…usage #2742.
- Loading branch information
1 parent
4297959
commit f59beee
Showing
3 changed files
with
22 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
ui/dashboard/src/components/dashboards/DashboardErrorModal/index.tsx
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
ui/dashboard/src/components/dashboards/WorkspaceErrorModal/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |