From 5b9dfe60eed372ad509087e4733b7ea6199e369c Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Tue, 16 May 2023 21:36:59 -0400 Subject: [PATCH 1/4] Refactor: [M3-6337] - MUI v5 Migration - --- .../AccountActivationLanding.tsx | 2 +- .../ErrorState/ErrorState.stories.mdx | 2 +- .../src/components/ErrorState/ErrorState.tsx | 75 ++++++++----------- .../src/components/ErrorState/index.ts | 2 - .../ExtendedAccordion.test.tsx | 2 +- .../ExtendedAccordion/ExtendedAccordion.tsx | 2 +- .../LongviewLineGraph/LongviewLineGraph.tsx | 2 +- .../src/components/MaintenanceScreen.tsx | 2 +- .../PanelErrorBoundary/PanelErrorBoundary.tsx | 2 +- .../SectionErrorBoundary.tsx | 2 +- .../TableRowError/TableRowError.tsx | 2 +- .../src/features/Account/GlobalSettings.tsx | 2 +- .../src/features/Billing/BillingDetail.tsx | 2 +- .../PaymentDrawer/PaymentDrawer.tsx | 2 +- .../DatabaseCreate/DatabaseCreate.tsx | 2 +- .../Databases/DatabaseDetail/index.tsx | 2 +- .../DatabaseLanding/DatabaseLanding.tsx | 2 +- .../Domains/DomainDetail/DomainDetail.tsx | 2 +- .../features/Domains/DomainDetail/index.tsx | 2 +- .../src/features/Domains/DomainsLanding.tsx | 2 +- .../ConfirmTransferDialog.tsx | 2 +- .../Firewalls/FirewallDetail/index.tsx | 2 +- .../FirewallLanding/FirewallLanding.tsx | 2 +- .../src/features/Images/ImagesLanding.tsx | 2 +- .../CreateCluster/CreateCluster.tsx | 2 +- .../CreateCluster/NodePoolPanel.tsx | 2 +- .../KubernetesClusterDetail.tsx | 2 +- .../NodePoolsDisplay/NodePoolsDisplay.tsx | 2 +- .../KubernetesLanding/KubernetesLanding.tsx | 2 +- packages/manager/src/features/Lish/Glish.tsx | 2 +- packages/manager/src/features/Lish/Lish.tsx | 2 +- .../manager/src/features/Lish/Weblish.tsx | 2 +- .../LongviewDetail/DetailTabs/Disks/Disks.tsx | 2 +- .../DetailTabs/Network/NetworkGraphs.tsx | 2 +- .../LongviewDetail/LongviewDetail.tsx | 2 +- .../Longview/LongviewLanding/LongviewList.tsx | 2 +- .../ManagedChartPanel.tsx | 2 +- .../ManagedDashboardCard.tsx | 2 +- .../Managed/Monitors/HistoryDrawer.tsx | 2 +- .../Managed/SSHAccess/LinodePubKey.tsx | 2 +- .../NodeBalancerDetail/NodeBalancerDetail.tsx | 2 +- .../NodeBalancerSummary/TablesPanel.tsx | 2 +- .../NodeBalancersLanding.tsx | 2 +- .../ObjectStorage/BucketDetail/BucketSSL.tsx | 2 +- .../BucketLanding/BucketLanding.tsx | 2 +- .../AuthenticationSettings.tsx | 2 +- .../StackScriptBase/StackScriptBase.tsx | 2 +- .../StackScriptCreate/StackScriptCreate.tsx | 2 +- .../SupportTicketDetail.tsx | 2 +- .../manager/src/features/Users/UserDetail.tsx | 2 +- .../src/features/Volumes/VolumesLanding.tsx | 2 +- .../linodes/LinodesCreate/LinodeCreate.tsx | 2 +- .../linodes/LinodesCreate/SelectAppPanel.tsx | 2 +- .../LinodeBackup/LinodeBackups.tsx | 2 +- .../LinodeDetailErrorBoundary.tsx | 2 +- .../LinodeNetworking/LinodeNetworking.tsx | 2 +- .../TransferHistory.tsx | 2 +- .../LinodeRescue/StandardRescueDialog.tsx | 2 +- .../LinodeSettings/LinodeConfigDialog.tsx | 2 +- .../LinodeSummary/ActivitySummaryContent.tsx | 2 +- .../LinodeSummary/LinodeSummary.tsx | 2 +- .../linodes/LinodesDetail/LinodesDetail.tsx | 2 +- .../LinodesDetail/LinodesDetailNavigation.tsx | 2 +- .../linodes/LinodesLanding/LinodesLanding.tsx | 2 +- .../src/utilities/safeGetTabRender.tsx | 2 +- 65 files changed, 95 insertions(+), 108 deletions(-) delete mode 100644 packages/manager/src/components/ErrorState/index.ts diff --git a/packages/manager/src/components/AccountActivation/AccountActivationLanding.tsx b/packages/manager/src/components/AccountActivation/AccountActivationLanding.tsx index bfdee5d1cf2..c775789b314 100644 --- a/packages/manager/src/components/AccountActivation/AccountActivationLanding.tsx +++ b/packages/manager/src/components/AccountActivation/AccountActivationLanding.tsx @@ -3,7 +3,7 @@ import { Theme } from '@mui/material/styles'; import * as React from 'react'; import { useHistory } from 'react-router-dom'; import Typography from 'src/components/core/Typography'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { AttachmentError } from 'src/features/Support/SupportTicketDetail/SupportTicketDetail'; import SupportTicketDrawer from 'src/features/Support/SupportTickets/SupportTicketDrawer'; import { makeStyles } from 'tss-react/mui'; diff --git a/packages/manager/src/components/ErrorState/ErrorState.stories.mdx b/packages/manager/src/components/ErrorState/ErrorState.stories.mdx index cf665fa5922..a32e548e1df 100644 --- a/packages/manager/src/components/ErrorState/ErrorState.stories.mdx +++ b/packages/manager/src/components/ErrorState/ErrorState.stories.mdx @@ -1,5 +1,5 @@ import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs'; -import ErrorState from './ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; ; CustomIconStyles?: React.CSSProperties; + errorText: string | JSX.Element; } -const useStyles = makeStyles((theme: Theme) => ({ - root: { - width: '100%', - padding: theme.spacing(10), - marginLeft: 0, - }, - compact: { - padding: theme.spacing(5), - }, - cozy: { - padding: theme.spacing(1), - }, - iconContainer: { - textAlign: 'center', - }, - icon: { - marginBottom: theme.spacing(2), +export const ErrorState = (props: ErrorStateProps) => { + const { CustomIcon } = props; + const theme = useTheme(); + + const sxIcon = { color: theme.color.red, - width: 50, height: 50, - }, -})); + marginBottom: theme.spacing(2), + width: 50, + }; -const ErrorState = (props: Props) => { - const { CustomIcon } = props; - const classes = useStyles(); return ( - + -
+ {CustomIcon ? ( ) : ( - + )} -
+ {typeof props.errorText === 'string' ? ( {
{props.errorText}
)}
-
+ ); }; -export default ErrorState; +const StyledIconContainer = styled('div')({ + textAlign: 'center', +}); + +const ErrorStateRoot = styled(Grid)>( + ({ theme, ...props }) => ({ + marginLeft: 0, + padding: props.compact + ? theme.spacing(5) + : !!props.cozy + ? theme.spacing(1) + : theme.spacing(10), + width: '100%', + }) +); diff --git a/packages/manager/src/components/ErrorState/index.ts b/packages/manager/src/components/ErrorState/index.ts deleted file mode 100644 index 961100a52f3..00000000000 --- a/packages/manager/src/components/ErrorState/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -import ErrorState from './ErrorState'; -export default ErrorState; diff --git a/packages/manager/src/components/ExtendedAccordion/ExtendedAccordion.test.tsx b/packages/manager/src/components/ExtendedAccordion/ExtendedAccordion.test.tsx index 276710da8be..dc708749ede 100644 --- a/packages/manager/src/components/ExtendedAccordion/ExtendedAccordion.test.tsx +++ b/packages/manager/src/components/ExtendedAccordion/ExtendedAccordion.test.tsx @@ -2,7 +2,7 @@ import { shallow } from 'enzyme'; import * as React from 'react'; import { CircleProgress } from 'src/components/CircleProgress'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { Provider } from 'react-redux'; import ExtendedAccordion from './ExtendedAccordion'; import { storeFactory } from 'src/store'; diff --git a/packages/manager/src/components/ExtendedAccordion/ExtendedAccordion.tsx b/packages/manager/src/components/ExtendedAccordion/ExtendedAccordion.tsx index 152c5d4cdf0..02dec8d7ea5 100644 --- a/packages/manager/src/components/ExtendedAccordion/ExtendedAccordion.tsx +++ b/packages/manager/src/components/ExtendedAccordion/ExtendedAccordion.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import Accordion, { AccordionProps } from 'src/components/Accordion'; import { CircleProgress } from 'src/components/CircleProgress'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; interface Props extends Omit { height?: number; diff --git a/packages/manager/src/components/LongviewLineGraph/LongviewLineGraph.tsx b/packages/manager/src/components/LongviewLineGraph/LongviewLineGraph.tsx index c18efb3a213..4ac8d1179a6 100644 --- a/packages/manager/src/components/LongviewLineGraph/LongviewLineGraph.tsx +++ b/packages/manager/src/components/LongviewLineGraph/LongviewLineGraph.tsx @@ -4,7 +4,7 @@ import Divider from 'src/components/core/Divider'; import { makeStyles } from '@mui/styles'; import { Theme } from '@mui/material/styles'; import Typography from 'src/components/core/Typography'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import LineGraph, { DataSet, Props as LineGraphProps, diff --git a/packages/manager/src/components/MaintenanceScreen.tsx b/packages/manager/src/components/MaintenanceScreen.tsx index c57a5c5558e..51937a71f30 100644 --- a/packages/manager/src/components/MaintenanceScreen.tsx +++ b/packages/manager/src/components/MaintenanceScreen.tsx @@ -5,7 +5,7 @@ import { Theme } from '@mui/material/styles'; import Typography from 'src/components/core/Typography'; import Box from 'src/components/core/Box'; import Logo from 'src/assets/logo/akamai-logo.svg'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import BuildIcon from '@mui/icons-material/Build'; const useStyles = makeStyles((theme: Theme) => ({ diff --git a/packages/manager/src/components/PanelErrorBoundary/PanelErrorBoundary.tsx b/packages/manager/src/components/PanelErrorBoundary/PanelErrorBoundary.tsx index 0c25825ac3d..e2124544874 100644 --- a/packages/manager/src/components/PanelErrorBoundary/PanelErrorBoundary.tsx +++ b/packages/manager/src/components/PanelErrorBoundary/PanelErrorBoundary.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import Accordion, { AccordionProps } from 'src/components/Accordion'; /* tslint:disable-next-line */ diff --git a/packages/manager/src/components/SectionErrorBoundary/SectionErrorBoundary.tsx b/packages/manager/src/components/SectionErrorBoundary/SectionErrorBoundary.tsx index 4b61a6c6b54..d5c163f163a 100644 --- a/packages/manager/src/components/SectionErrorBoundary/SectionErrorBoundary.tsx +++ b/packages/manager/src/components/SectionErrorBoundary/SectionErrorBoundary.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; interface State { error?: Error; diff --git a/packages/manager/src/components/TableRowError/TableRowError.tsx b/packages/manager/src/components/TableRowError/TableRowError.tsx index 2c611b4ffdf..cc0e6b6feea 100644 --- a/packages/manager/src/components/TableRowError/TableRowError.tsx +++ b/packages/manager/src/components/TableRowError/TableRowError.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { TableCell } from 'src/components/TableCell'; import { TableRow } from 'src/components/TableRow'; diff --git a/packages/manager/src/features/Account/GlobalSettings.tsx b/packages/manager/src/features/Account/GlobalSettings.tsx index 0dcf1c40f16..af01e4f4931 100644 --- a/packages/manager/src/features/Account/GlobalSettings.tsx +++ b/packages/manager/src/features/Account/GlobalSettings.tsx @@ -9,7 +9,7 @@ import { compose } from 'recompose'; import { AnyAction } from 'redux'; import { ThunkDispatch } from 'redux-thunk'; import { CircleProgress } from 'src/components/CircleProgress'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { useReduxLoad } from 'src/hooks/useReduxLoad'; import { ApplicationState } from 'src/store'; import { handleOpen } from 'src/store/backupDrawer'; diff --git a/packages/manager/src/features/Billing/BillingDetail.tsx b/packages/manager/src/features/Billing/BillingDetail.tsx index 4da7fecadc3..5c3df5fa9dd 100644 --- a/packages/manager/src/features/Billing/BillingDetail.tsx +++ b/packages/manager/src/features/Billing/BillingDetail.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { CircleProgress } from 'src/components/CircleProgress'; import { DocumentTitleSegment } from 'src/components/DocumentTitle'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import Grid from '@mui/material/Unstable_Grid2'; import { useAccount } from 'src/queries/account'; import { getAPIErrorOrDefault } from 'src/utilities/errorUtils'; diff --git a/packages/manager/src/features/Billing/BillingPanels/BillingSummary/PaymentDrawer/PaymentDrawer.tsx b/packages/manager/src/features/Billing/BillingPanels/BillingSummary/PaymentDrawer/PaymentDrawer.tsx index 6801072ed18..217c31ef1d2 100644 --- a/packages/manager/src/features/Billing/BillingPanels/BillingSummary/PaymentDrawer/PaymentDrawer.tsx +++ b/packages/manager/src/features/Billing/BillingPanels/BillingSummary/PaymentDrawer/PaymentDrawer.tsx @@ -11,7 +11,7 @@ import { Theme } from '@mui/material/styles'; import Typography from 'src/components/core/Typography'; import { Currency } from 'src/components/Currency'; import Drawer from 'src/components/Drawer'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import Grid from '@mui/material/Unstable_Grid2'; import { TooltipIcon } from 'src/components/TooltipIcon/TooltipIcon'; import LinearProgress from 'src/components/LinearProgress'; diff --git a/packages/manager/src/features/Databases/DatabaseCreate/DatabaseCreate.tsx b/packages/manager/src/features/Databases/DatabaseCreate/DatabaseCreate.tsx index 300f2aafcbf..1521b30c88e 100644 --- a/packages/manager/src/features/Databases/DatabaseCreate/DatabaseCreate.tsx +++ b/packages/manager/src/features/Databases/DatabaseCreate/DatabaseCreate.tsx @@ -30,7 +30,7 @@ import SingleValue from 'src/components/EnhancedSelect/components/SingleValue'; import Select, { Item } from 'src/components/EnhancedSelect/Select'; import { RegionSelect } from 'src/components/EnhancedSelect/variants/RegionSelect'; import RegionOption from 'src/components/EnhancedSelect/variants/RegionSelect/RegionOption'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import Grid from '@mui/material/Unstable_Grid2'; import LandingHeader from 'src/components/LandingHeader'; import Link from 'src/components/Link'; diff --git a/packages/manager/src/features/Databases/DatabaseDetail/index.tsx b/packages/manager/src/features/Databases/DatabaseDetail/index.tsx index 6715578a0c9..baa06fbc9cb 100644 --- a/packages/manager/src/features/Databases/DatabaseDetail/index.tsx +++ b/packages/manager/src/features/Databases/DatabaseDetail/index.tsx @@ -6,7 +6,7 @@ import { CircleProgress } from 'src/components/CircleProgress'; import TabPanels from 'src/components/core/ReachTabPanels'; import Tabs from 'src/components/core/ReachTabs'; import { DocumentTitleSegment } from 'src/components/DocumentTitle'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import SafeTabPanel from 'src/components/SafeTabPanel'; import TabLinkList from 'src/components/TabLinkList'; import useEditableLabelState from 'src/hooks/useEditableLabelState'; diff --git a/packages/manager/src/features/Databases/DatabaseLanding/DatabaseLanding.tsx b/packages/manager/src/features/Databases/DatabaseLanding/DatabaseLanding.tsx index 5f5b56764e2..e635dea3fc0 100644 --- a/packages/manager/src/features/Databases/DatabaseLanding/DatabaseLanding.tsx +++ b/packages/manager/src/features/Databases/DatabaseLanding/DatabaseLanding.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import Hidden from 'src/components/core/Hidden'; import LandingHeader from 'src/components/LandingHeader'; import ProductInformationBanner from 'src/components/ProductInformationBanner'; diff --git a/packages/manager/src/features/Domains/DomainDetail/DomainDetail.tsx b/packages/manager/src/features/Domains/DomainDetail/DomainDetail.tsx index 45a8a8ddabf..6b02c889ae9 100644 --- a/packages/manager/src/features/Domains/DomainDetail/DomainDetail.tsx +++ b/packages/manager/src/features/Domains/DomainDetail/DomainDetail.tsx @@ -3,7 +3,7 @@ import { useHistory, useLocation, useParams } from 'react-router-dom'; import { CircleProgress } from 'src/components/CircleProgress'; import { makeStyles } from '@mui/styles'; import { Theme } from '@mui/material/styles'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { Notice } from 'src/components/Notice/Notice'; import summaryPanelStyles from 'src/containers/SummaryPanels.styles'; import LandingHeader from 'src/components/LandingHeader'; diff --git a/packages/manager/src/features/Domains/DomainDetail/index.tsx b/packages/manager/src/features/Domains/DomainDetail/index.tsx index a2e0f19afec..b801bb179a5 100644 --- a/packages/manager/src/features/Domains/DomainDetail/index.tsx +++ b/packages/manager/src/features/Domains/DomainDetail/index.tsx @@ -3,7 +3,7 @@ import { useParams } from 'react-router-dom'; import { CircleProgress } from 'src/components/CircleProgress'; import NotFound from 'src/components/NotFound'; import { useDomainQuery } from 'src/queries/domains'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; const DomainsLanding = React.lazy(() => import('../DomainsLanding')); const DomainDetail = React.lazy(() => import('./DomainDetail')); diff --git a/packages/manager/src/features/Domains/DomainsLanding.tsx b/packages/manager/src/features/Domains/DomainsLanding.tsx index c691702aac0..748baef3e6c 100644 --- a/packages/manager/src/features/Domains/DomainsLanding.tsx +++ b/packages/manager/src/features/Domains/DomainsLanding.tsx @@ -8,7 +8,7 @@ import { makeStyles } from '@mui/styles'; import { Theme } from '@mui/material/styles'; import { DeletionDialog } from 'src/components/DeletionDialog/DeletionDialog'; import { DocumentTitleSegment } from 'src/components/DocumentTitle'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import LandingHeader from 'src/components/LandingHeader'; import { Notice } from 'src/components/Notice/Notice'; import { getAPIErrorOrDefault } from 'src/utilities/errorUtils'; diff --git a/packages/manager/src/features/EntityTransfers/EntityTransfersLanding/ConfirmTransferDialog.tsx b/packages/manager/src/features/EntityTransfers/EntityTransfersLanding/ConfirmTransferDialog.tsx index 55fa3894ff6..c3e6852cd05 100644 --- a/packages/manager/src/features/EntityTransfers/EntityTransfersLanding/ConfirmTransferDialog.tsx +++ b/packages/manager/src/features/EntityTransfers/EntityTransfersLanding/ConfirmTransferDialog.tsx @@ -13,7 +13,7 @@ import { ConfirmationDialog } from 'src/components/ConfirmationDialog/Confirmati import { makeStyles } from '@mui/styles'; import { Theme } from '@mui/material/styles'; import Typography from 'src/components/core/Typography'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { Notice } from 'src/components/Notice/Notice'; import { queryKey, diff --git a/packages/manager/src/features/Firewalls/FirewallDetail/index.tsx b/packages/manager/src/features/Firewalls/FirewallDetail/index.tsx index 72d5e4573a1..a0b90c725a8 100644 --- a/packages/manager/src/features/Firewalls/FirewallDetail/index.tsx +++ b/packages/manager/src/features/Firewalls/FirewallDetail/index.tsx @@ -3,7 +3,7 @@ import { CircleProgress } from 'src/components/CircleProgress'; import TabPanels from 'src/components/core/ReachTabPanels'; import Tabs from 'src/components/core/ReachTabs'; import { DocumentTitleSegment } from 'src/components/DocumentTitle'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import NotFound from 'src/components/NotFound'; import SafeTabPanel from 'src/components/SafeTabPanel'; import TabLinkList from 'src/components/TabLinkList'; diff --git a/packages/manager/src/features/Firewalls/FirewallLanding/FirewallLanding.tsx b/packages/manager/src/features/Firewalls/FirewallLanding/FirewallLanding.tsx index 9429d7d4983..a4080bdfd7d 100644 --- a/packages/manager/src/features/Firewalls/FirewallLanding/FirewallLanding.tsx +++ b/packages/manager/src/features/Firewalls/FirewallLanding/FirewallLanding.tsx @@ -10,7 +10,7 @@ import { FirewallLandingEmptyState } from './FirewallLandingEmptyState'; import FirewallRow from './FirewallRow'; import { usePagination } from 'src/hooks/usePagination'; import { useOrder } from 'src/hooks/useOrder'; -import ErrorState from 'src/components/ErrorState/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { getAPIErrorOrDefault } from 'src/utilities/errorUtils'; import { Table } from 'src/components/Table'; import { TableHead } from 'src/components/TableHead'; diff --git a/packages/manager/src/features/Images/ImagesLanding.tsx b/packages/manager/src/features/Images/ImagesLanding.tsx index 9582649747b..a078b4f8a1b 100644 --- a/packages/manager/src/features/Images/ImagesLanding.tsx +++ b/packages/manager/src/features/Images/ImagesLanding.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import ActionsPanel from 'src/components/ActionsPanel'; import Button from 'src/components/Button'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import Hidden from 'src/components/core/Hidden'; import imageEvents from 'src/store/selectors/imageEvents'; import ImageRow, { ImageWithEvent } from './ImageRow'; diff --git a/packages/manager/src/features/Kubernetes/CreateCluster/CreateCluster.tsx b/packages/manager/src/features/Kubernetes/CreateCluster/CreateCluster.tsx index c750795cb8e..c487f111862 100644 --- a/packages/manager/src/features/Kubernetes/CreateCluster/CreateCluster.tsx +++ b/packages/manager/src/features/Kubernetes/CreateCluster/CreateCluster.tsx @@ -15,7 +15,7 @@ import { Theme } from '@mui/material/styles'; import { DocumentTitleSegment } from 'src/components/DocumentTitle'; import Select, { Item } from 'src/components/EnhancedSelect/Select'; import { RegionSelect } from 'src/components/EnhancedSelect/variants/RegionSelect'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { Notice } from 'src/components/Notice/Notice'; import { regionHelperText } from 'src/components/SelectRegionPanel/SelectRegionPanel'; import TextField from 'src/components/TextField'; diff --git a/packages/manager/src/features/Kubernetes/CreateCluster/NodePoolPanel.tsx b/packages/manager/src/features/Kubernetes/CreateCluster/NodePoolPanel.tsx index 656e6a21acc..972a3fe42ee 100644 --- a/packages/manager/src/features/Kubernetes/CreateCluster/NodePoolPanel.tsx +++ b/packages/manager/src/features/Kubernetes/CreateCluster/NodePoolPanel.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import { compose } from 'recompose'; import { CircleProgress } from 'src/components/CircleProgress'; import Grid from '@mui/material/Unstable_Grid2'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import renderGuard, { RenderGuardProps } from 'src/components/RenderGuard'; import SelectPlanQuantityPanel from 'src/features/linodes/LinodesCreate/SelectPlanQuantityPanel'; import { ExtendedType, extendType } from 'src/utilities/extendType'; diff --git a/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubernetesClusterDetail.tsx b/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubernetesClusterDetail.tsx index 5fa6792d234..157c24a9ea0 100644 --- a/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubernetesClusterDetail.tsx +++ b/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubernetesClusterDetail.tsx @@ -3,7 +3,7 @@ import { useLocation, useParams } from 'react-router-dom'; import { CircleProgress } from 'src/components/CircleProgress'; import Grid from '@mui/material/Unstable_Grid2'; import { DocumentTitleSegment } from 'src/components/DocumentTitle'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { getKubeHighAvailability } from 'src/features/Kubernetes/kubeUtils'; import { useAccount } from 'src/queries/account'; import { diff --git a/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/NodePoolsDisplay/NodePoolsDisplay.tsx b/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/NodePoolsDisplay/NodePoolsDisplay.tsx index e4429177e5b..e9933da911e 100644 --- a/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/NodePoolsDisplay/NodePoolsDisplay.tsx +++ b/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/NodePoolsDisplay/NodePoolsDisplay.tsx @@ -4,7 +4,7 @@ import Paper from 'src/components/core/Paper'; import { makeStyles } from '@mui/styles'; import { Theme } from '@mui/material/styles'; import Typography from 'src/components/core/Typography'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import Grid from '@mui/material/Unstable_Grid2'; import { RecycleNodePoolDialog } from '../RecycleNodePoolDialog'; import { AddNodePoolDrawer } from './AddNodePoolDrawer'; diff --git a/packages/manager/src/features/Kubernetes/KubernetesLanding/KubernetesLanding.tsx b/packages/manager/src/features/Kubernetes/KubernetesLanding/KubernetesLanding.tsx index 044fa07eab7..a6d2b3f7502 100644 --- a/packages/manager/src/features/Kubernetes/KubernetesLanding/KubernetesLanding.tsx +++ b/packages/manager/src/features/Kubernetes/KubernetesLanding/KubernetesLanding.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import Hidden from 'src/components/core/Hidden'; import LandingHeader from 'src/components/LandingHeader'; import TransferDisplay from 'src/components/TransferDisplay'; diff --git a/packages/manager/src/features/Lish/Glish.tsx b/packages/manager/src/features/Lish/Glish.tsx index f144208d2b7..8a0e38d7657 100644 --- a/packages/manager/src/features/Lish/Glish.tsx +++ b/packages/manager/src/features/Lish/Glish.tsx @@ -5,7 +5,7 @@ import { VncScreen, VncScreenHandle } from 'react-vnc'; import { getLishSchemeAndHostname, resizeViewPort } from './lishUtils'; import { makeStyles } from '@mui/styles'; import { CircleProgress } from 'src/components/CircleProgress'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; const useStyles = makeStyles(() => ({ container: { diff --git a/packages/manager/src/features/Lish/Lish.tsx b/packages/manager/src/features/Lish/Lish.tsx index 2d5c084034c..13ffa6302a4 100644 --- a/packages/manager/src/features/Lish/Lish.tsx +++ b/packages/manager/src/features/Lish/Lish.tsx @@ -5,7 +5,7 @@ import TabPanels from 'src/components/core/ReachTabPanels'; import Tabs from 'src/components/core/ReachTabs'; import { makeStyles } from '@mui/styles'; import { Theme } from '@mui/material/styles'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import SafeTabPanel from 'src/components/SafeTabPanel'; import TabLinkList from 'src/components/TabLinkList'; import { Tab } from 'src/components/TabLinkList/TabLinkList'; diff --git a/packages/manager/src/features/Lish/Weblish.tsx b/packages/manager/src/features/Lish/Weblish.tsx index cf411275ca1..e0b3bd9942e 100644 --- a/packages/manager/src/features/Lish/Weblish.tsx +++ b/packages/manager/src/features/Lish/Weblish.tsx @@ -1,6 +1,6 @@ /* eslint-disable scanjs-rules/call_addEventListener */ import * as React from 'react'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { CircleProgress } from 'src/components/CircleProgress'; import { Linode } from '@linode/api-v4/lib/linodes'; import { Terminal } from 'xterm'; diff --git a/packages/manager/src/features/Longview/LongviewDetail/DetailTabs/Disks/Disks.tsx b/packages/manager/src/features/Longview/LongviewDetail/DetailTabs/Disks/Disks.tsx index e0722595e7a..29dd39f1727 100644 --- a/packages/manager/src/features/Longview/LongviewDetail/DetailTabs/Disks/Disks.tsx +++ b/packages/manager/src/features/Longview/LongviewDetail/DetailTabs/Disks/Disks.tsx @@ -5,7 +5,7 @@ import Box from 'src/components/core/Box'; import { makeStyles } from '@mui/styles'; import { Theme } from '@mui/material/styles'; import { DocumentTitleSegment } from 'src/components/DocumentTitle'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import LandingLoading from 'src/components/LandingLoading'; import Placeholder from 'src/components/Placeholder'; import { WithStartAndEnd } from '../../../request.types'; diff --git a/packages/manager/src/features/Longview/LongviewDetail/DetailTabs/Network/NetworkGraphs.tsx b/packages/manager/src/features/Longview/LongviewDetail/DetailTabs/Network/NetworkGraphs.tsx index ad18501da71..7ae43ea2494 100644 --- a/packages/manager/src/features/Longview/LongviewDetail/DetailTabs/Network/NetworkGraphs.tsx +++ b/packages/manager/src/features/Longview/LongviewDetail/DetailTabs/Network/NetworkGraphs.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { CircleProgress } from 'src/components/CircleProgress'; import { withTheme, WithTheme } from '@mui/styles'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import LongviewLineGraph from 'src/components/LongviewLineGraph'; import Placeholder from 'src/components/Placeholder'; import { diff --git a/packages/manager/src/features/Longview/LongviewDetail/LongviewDetail.tsx b/packages/manager/src/features/Longview/LongviewDetail/LongviewDetail.tsx index db2bda303de..40d82b62682 100644 --- a/packages/manager/src/features/Longview/LongviewDetail/LongviewDetail.tsx +++ b/packages/manager/src/features/Longview/LongviewDetail/LongviewDetail.tsx @@ -9,7 +9,7 @@ import TabPanels from 'src/components/core/ReachTabPanels'; import Tabs from 'src/components/core/ReachTabs'; import { makeStyles } from '@mui/styles'; import { Theme } from '@mui/material/styles'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import NotFound from 'src/components/NotFound'; import { Notice } from 'src/components/Notice/Notice'; import SafeTabPanel from 'src/components/SafeTabPanel'; diff --git a/packages/manager/src/features/Longview/LongviewLanding/LongviewList.tsx b/packages/manager/src/features/Longview/LongviewLanding/LongviewList.tsx index 5376e339039..85908d238b9 100644 --- a/packages/manager/src/features/Longview/LongviewLanding/LongviewList.tsx +++ b/packages/manager/src/features/Longview/LongviewLanding/LongviewList.tsx @@ -7,7 +7,7 @@ import Paper from 'src/components/core/Paper'; import { makeStyles } from '@mui/styles'; import { Theme } from '@mui/material/styles'; import Typography from 'src/components/core/Typography'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import Paginate from 'src/components/Paginate'; import { PaginationFooter } from 'src/components/PaginationFooter/PaginationFooter'; import { Props as LVProps } from 'src/containers/longview.container'; diff --git a/packages/manager/src/features/Managed/ManagedDashboardCard/ManagedChartPanel.tsx b/packages/manager/src/features/Managed/ManagedDashboardCard/ManagedChartPanel.tsx index 2743fd0dce9..eeb3b4f06e8 100644 --- a/packages/manager/src/features/Managed/ManagedDashboardCard/ManagedChartPanel.tsx +++ b/packages/manager/src/features/Managed/ManagedDashboardCard/ManagedChartPanel.tsx @@ -4,7 +4,7 @@ import { CircleProgress } from 'src/components/CircleProgress'; import { makeStyles, WithTheme, withTheme } from '@mui/styles'; import { Theme } from '@mui/material/styles'; import Typography from 'src/components/core/Typography'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import LineGraph from 'src/components/LineGraph'; import TabbedPanel from 'src/components/TabbedPanel'; import { diff --git a/packages/manager/src/features/Managed/ManagedDashboardCard/ManagedDashboardCard.tsx b/packages/manager/src/features/Managed/ManagedDashboardCard/ManagedDashboardCard.tsx index 08baf393843..aa29dbc7f1b 100644 --- a/packages/manager/src/features/Managed/ManagedDashboardCard/ManagedDashboardCard.tsx +++ b/packages/manager/src/features/Managed/ManagedDashboardCard/ManagedDashboardCard.tsx @@ -3,7 +3,7 @@ import { Theme } from '@mui/material/styles'; import { makeStyles } from '@mui/styles'; import * as React from 'react'; import { CircleProgress } from 'src/components/CircleProgress'; -import ErrorState from 'src/components/ErrorState/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { useAllManagedIssuesQuery, useAllManagedMonitorsQuery, diff --git a/packages/manager/src/features/Managed/Monitors/HistoryDrawer.tsx b/packages/manager/src/features/Managed/Monitors/HistoryDrawer.tsx index 80504cdfeca..fcb549ff820 100644 --- a/packages/manager/src/features/Managed/Monitors/HistoryDrawer.tsx +++ b/packages/manager/src/features/Managed/Monitors/HistoryDrawer.tsx @@ -5,7 +5,7 @@ import ActionsPanel from 'src/components/ActionsPanel'; import Button from 'src/components/Button'; import { CircleProgress } from 'src/components/CircleProgress'; import Drawer from 'src/components/Drawer'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { getAPIErrorOrDefault } from 'src/utilities/errorUtils'; import IssueCalendar from './IssueCalendar'; diff --git a/packages/manager/src/features/Managed/SSHAccess/LinodePubKey.tsx b/packages/manager/src/features/Managed/SSHAccess/LinodePubKey.tsx index 3397bd9fc1d..760c1a64d26 100644 --- a/packages/manager/src/features/Managed/SSHAccess/LinodePubKey.tsx +++ b/packages/manager/src/features/Managed/SSHAccess/LinodePubKey.tsx @@ -8,7 +8,7 @@ import Paper from 'src/components/core/Paper'; import { makeStyles } from '@mui/styles'; import { Theme } from '@mui/material/styles'; import Typography from 'src/components/core/Typography'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import Grid from '@mui/material/Unstable_Grid2'; import { useManagedSSHKey } from 'src/queries/managed/managed'; import { getErrorStringOrDefault } from 'src/utilities/errorUtils'; diff --git a/packages/manager/src/features/NodeBalancers/NodeBalancerDetail/NodeBalancerDetail.tsx b/packages/manager/src/features/NodeBalancers/NodeBalancerDetail/NodeBalancerDetail.tsx index b611a044006..8574ad7a5c3 100644 --- a/packages/manager/src/features/NodeBalancers/NodeBalancerDetail/NodeBalancerDetail.tsx +++ b/packages/manager/src/features/NodeBalancers/NodeBalancerDetail/NodeBalancerDetail.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { CircleProgress } from 'src/components/CircleProgress'; import TabPanels from 'src/components/core/ReachTabPanels'; import Tabs from 'src/components/core/ReachTabs'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { Notice } from 'src/components/Notice/Notice'; import SafeTabPanel from 'src/components/SafeTabPanel'; import TabLinkList from 'src/components/TabLinkList'; diff --git a/packages/manager/src/features/NodeBalancers/NodeBalancerDetail/NodeBalancerSummary/TablesPanel.tsx b/packages/manager/src/features/NodeBalancers/NodeBalancerDetail/NodeBalancerSummary/TablesPanel.tsx index cf5a13a46e3..74e8528389b 100644 --- a/packages/manager/src/features/NodeBalancers/NodeBalancerDetail/NodeBalancerSummary/TablesPanel.tsx +++ b/packages/manager/src/features/NodeBalancers/NodeBalancerDetail/NodeBalancerSummary/TablesPanel.tsx @@ -3,7 +3,7 @@ import { CircleProgress } from 'src/components/CircleProgress'; import Paper from 'src/components/core/Paper'; import { makeStyles } from '@mui/styles'; import Typography from 'src/components/core/Typography'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import LineGraph from 'src/components/LineGraph'; import MetricsDisplay from 'src/components/LineGraph/MetricsDisplay'; import getUserTimezone from 'src/utilities/getUserTimezone'; diff --git a/packages/manager/src/features/NodeBalancers/NodeBalancersLanding/NodeBalancersLanding.tsx b/packages/manager/src/features/NodeBalancers/NodeBalancersLanding/NodeBalancersLanding.tsx index 460a03507d4..0e086ff386d 100644 --- a/packages/manager/src/features/NodeBalancers/NodeBalancersLanding/NodeBalancersLanding.tsx +++ b/packages/manager/src/features/NodeBalancers/NodeBalancersLanding/NodeBalancersLanding.tsx @@ -6,7 +6,7 @@ import { TableBody } from 'src/components/TableBody'; import { TableHead } from 'src/components/TableHead'; import { TableRow } from 'src/components/TableRow'; import { DocumentTitleSegment } from 'src/components/DocumentTitle'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import LandingHeader from 'src/components/LandingHeader'; import { PaginationFooter } from 'src/components/PaginationFooter/PaginationFooter'; import { Table } from 'src/components/Table'; diff --git a/packages/manager/src/features/ObjectStorage/BucketDetail/BucketSSL.tsx b/packages/manager/src/features/ObjectStorage/BucketDetail/BucketSSL.tsx index f0094469376..ab2b466c37a 100644 --- a/packages/manager/src/features/ObjectStorage/BucketDetail/BucketSSL.tsx +++ b/packages/manager/src/features/ObjectStorage/BucketDetail/BucketSSL.tsx @@ -13,7 +13,7 @@ import Paper from 'src/components/core/Paper'; import { makeStyles } from '@mui/styles'; import { Theme } from '@mui/material/styles'; import Typography from 'src/components/core/Typography'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import ExternalLink from 'src/components/ExternalLink'; import Grid from '@mui/material/Unstable_Grid2'; import { Notice } from 'src/components/Notice/Notice'; diff --git a/packages/manager/src/features/ObjectStorage/BucketLanding/BucketLanding.tsx b/packages/manager/src/features/ObjectStorage/BucketLanding/BucketLanding.tsx index 7600a285e6e..db8ffa45fab 100644 --- a/packages/manager/src/features/ObjectStorage/BucketLanding/BucketLanding.tsx +++ b/packages/manager/src/features/ObjectStorage/BucketLanding/BucketLanding.tsx @@ -6,7 +6,7 @@ import * as React from 'react'; import BucketDetailsDrawer from './BucketDetailsDrawer'; import BucketTable from './BucketTable'; import CancelNotice from '../CancelNotice'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import Grid from '@mui/material/Unstable_Grid2'; import { Notice } from 'src/components/Notice/Notice'; import OrderBy from 'src/components/OrderBy'; diff --git a/packages/manager/src/features/Profile/AuthenticationSettings/AuthenticationSettings.tsx b/packages/manager/src/features/Profile/AuthenticationSettings/AuthenticationSettings.tsx index 7058030e482..ca484353dbe 100644 --- a/packages/manager/src/features/Profile/AuthenticationSettings/AuthenticationSettings.tsx +++ b/packages/manager/src/features/Profile/AuthenticationSettings/AuthenticationSettings.tsx @@ -6,7 +6,7 @@ import { makeStyles } from '@mui/styles'; import { Theme } from '@mui/material/styles'; import Typography from 'src/components/core/Typography'; import { DocumentTitleSegment } from 'src/components/DocumentTitle'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { useProfile } from 'src/queries/profile'; import { PhoneVerification } from './PhoneVerification/PhoneVerification'; import ResetPassword from './ResetPassword'; diff --git a/packages/manager/src/features/StackScripts/StackScriptBase/StackScriptBase.tsx b/packages/manager/src/features/StackScripts/StackScriptBase/StackScriptBase.tsx index d775a9b4557..a910a0bc86e 100644 --- a/packages/manager/src/features/StackScripts/StackScriptBase/StackScriptBase.tsx +++ b/packages/manager/src/features/StackScripts/StackScriptBase/StackScriptBase.tsx @@ -10,7 +10,7 @@ import classNames from 'classnames'; import { CircleProgress } from 'src/components/CircleProgress'; import { compose } from 'recompose'; import { DebouncedSearchTextField } from 'src/components/DebouncedSearchTextField'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { Image } from '@linode/api-v4/lib/images'; import { pathOr } from 'ramda'; import { Notice } from 'src/components/Notice/Notice'; diff --git a/packages/manager/src/features/StackScripts/StackScriptCreate/StackScriptCreate.tsx b/packages/manager/src/features/StackScripts/StackScriptCreate/StackScriptCreate.tsx index e832ad3e22f..4b254538291 100644 --- a/packages/manager/src/features/StackScripts/StackScriptCreate/StackScriptCreate.tsx +++ b/packages/manager/src/features/StackScripts/StackScriptCreate/StackScriptCreate.tsx @@ -19,7 +19,7 @@ import { createStyles, withStyles, WithStyles } from '@mui/styles'; import Typography from 'src/components/core/Typography'; import { DocumentTitleSegment } from 'src/components/DocumentTitle'; import { Item } from 'src/components/EnhancedSelect/Select'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { Notice } from 'src/components/Notice/Notice'; import withImages, { DefaultProps as ImagesProps, diff --git a/packages/manager/src/features/Support/SupportTicketDetail/SupportTicketDetail.tsx b/packages/manager/src/features/Support/SupportTicketDetail/SupportTicketDetail.tsx index 0e5571b7d35..5f92e5b4a41 100644 --- a/packages/manager/src/features/Support/SupportTicketDetail/SupportTicketDetail.tsx +++ b/packages/manager/src/features/Support/SupportTicketDetail/SupportTicketDetail.tsx @@ -8,7 +8,7 @@ import { makeStyles } from 'tss-react/mui'; import { Theme } from '@mui/material/styles'; import Typography from 'src/components/core/Typography'; import { DocumentTitleSegment } from 'src/components/DocumentTitle'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import Grid from '@mui/material/Unstable_Grid2'; import formatDate from 'src/utilities/formatDate'; import { ExpandableTicketPanel } from '../ExpandableTicketPanel'; diff --git a/packages/manager/src/features/Users/UserDetail.tsx b/packages/manager/src/features/Users/UserDetail.tsx index 9bd7ef82173..bf939c8f3a8 100644 --- a/packages/manager/src/features/Users/UserDetail.tsx +++ b/packages/manager/src/features/Users/UserDetail.tsx @@ -11,7 +11,7 @@ import { } from 'react-router-dom'; import TabPanels from 'src/components/core/ReachTabPanels'; import Tabs from 'src/components/core/ReachTabs'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { Notice } from 'src/components/Notice/Notice'; import SafeTabPanel from 'src/components/SafeTabPanel'; import TabLinkList from 'src/components/TabLinkList'; diff --git a/packages/manager/src/features/Volumes/VolumesLanding.tsx b/packages/manager/src/features/Volumes/VolumesLanding.tsx index f42f2ee257d..dff0f7b4695 100644 --- a/packages/manager/src/features/Volumes/VolumesLanding.tsx +++ b/packages/manager/src/features/Volumes/VolumesLanding.tsx @@ -8,7 +8,7 @@ import { bindActionCreators, Dispatch } from 'redux'; import { TableBody } from 'src/components/TableBody'; import { TableHead } from 'src/components/TableHead'; import { DocumentTitleSegment } from 'src/components/DocumentTitle'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import LandingHeader from 'src/components/LandingHeader'; import Loading from 'src/components/LandingLoading'; import { PaginationFooter } from 'src/components/PaginationFooter/PaginationFooter'; diff --git a/packages/manager/src/features/linodes/LinodesCreate/LinodeCreate.tsx b/packages/manager/src/features/linodes/LinodesCreate/LinodeCreate.tsx index 33ba036da71..4492179b020 100644 --- a/packages/manager/src/features/linodes/LinodesCreate/LinodeCreate.tsx +++ b/packages/manager/src/features/linodes/LinodesCreate/LinodeCreate.tsx @@ -18,7 +18,7 @@ import TabPanels from 'src/components/core/ReachTabPanels'; import Tabs from 'src/components/core/ReachTabs'; import Typography from 'src/components/core/Typography'; import DocsLink from 'src/components/DocsLink'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import Grid from '@mui/material/Unstable_Grid2'; import LabelAndTagsPanel from 'src/components/LabelAndTagsPanel'; import { Notice } from 'src/components/Notice/Notice'; diff --git a/packages/manager/src/features/linodes/LinodesCreate/SelectAppPanel.tsx b/packages/manager/src/features/linodes/LinodesCreate/SelectAppPanel.tsx index 805c249db87..5c12c2acf19 100644 --- a/packages/manager/src/features/linodes/LinodesCreate/SelectAppPanel.tsx +++ b/packages/manager/src/features/linodes/LinodesCreate/SelectAppPanel.tsx @@ -4,7 +4,7 @@ import { compose } from 'recompose'; import Paper from 'src/components/core/Paper'; import { createStyles, withStyles, WithStyles } from '@mui/styles'; import { Theme } from '@mui/material/styles'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import Loading from 'src/components/LandingLoading'; import { Notice } from 'src/components/Notice/Notice'; import AppPanelSection from 'src/features/linodes/LinodesCreate/AppPanelSection'; diff --git a/packages/manager/src/features/linodes/LinodesDetail/LinodeBackup/LinodeBackups.tsx b/packages/manager/src/features/linodes/LinodesDetail/LinodeBackup/LinodeBackups.tsx index 8fd56ea67b7..b0946796020 100644 --- a/packages/manager/src/features/linodes/LinodesDetail/LinodeBackup/LinodeBackups.tsx +++ b/packages/manager/src/features/linodes/LinodesDetail/LinodeBackup/LinodeBackups.tsx @@ -6,7 +6,7 @@ import Paper from 'src/components/core/Paper'; import { TableBody } from 'src/components/TableBody'; import { TableHead } from 'src/components/TableHead'; import Typography from 'src/components/core/Typography'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { TableCell } from 'src/components/TableCell'; import { TableRow } from 'src/components/TableRow'; import LinodePermissionsError from '../LinodePermissionsError'; diff --git a/packages/manager/src/features/linodes/LinodesDetail/LinodeDetailErrorBoundary.tsx b/packages/manager/src/features/linodes/LinodesDetail/LinodeDetailErrorBoundary.tsx index 8375c90e865..24bb3082847 100644 --- a/packages/manager/src/features/linodes/LinodesDetail/LinodeDetailErrorBoundary.tsx +++ b/packages/manager/src/features/linodes/LinodesDetail/LinodeDetailErrorBoundary.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { reportException } from 'src/exceptionReporting'; interface State { diff --git a/packages/manager/src/features/linodes/LinodesDetail/LinodeNetworking/LinodeNetworking.tsx b/packages/manager/src/features/linodes/LinodesDetail/LinodeNetworking/LinodeNetworking.tsx index 1892ecfb6ad..c11c9b86e1d 100644 --- a/packages/manager/src/features/linodes/LinodesDetail/LinodeNetworking/LinodeNetworking.tsx +++ b/packages/manager/src/features/linodes/LinodesDetail/LinodeNetworking/LinodeNetworking.tsx @@ -13,7 +13,7 @@ import { Theme, useTheme } from '@mui/material/styles'; import { TableBody } from 'src/components/TableBody'; import { TableHead } from 'src/components/TableHead'; import Typography from 'src/components/core/Typography'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import OrderBy from 'src/components/OrderBy'; import { Table } from 'src/components/Table'; import { TableCell } from 'src/components/TableCell'; diff --git a/packages/manager/src/features/linodes/LinodesDetail/LinodeNetworking/NetworkingSummaryPanel/TransferHistory.tsx b/packages/manager/src/features/linodes/LinodesDetail/LinodeNetworking/NetworkingSummaryPanel/TransferHistory.tsx index f3a0a53506e..6acf2f0e67f 100644 --- a/packages/manager/src/features/linodes/LinodesDetail/LinodeNetworking/NetworkingSummaryPanel/TransferHistory.tsx +++ b/packages/manager/src/features/linodes/LinodesDetail/LinodeNetworking/NetworkingSummaryPanel/TransferHistory.tsx @@ -7,7 +7,7 @@ import Box from 'src/components/core/Box'; import { makeStyles } from 'tss-react/mui'; import { Theme } from '@mui/material/styles'; import Typography from 'src/components/core/Typography'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import LineGraph from 'src/components/LineGraph'; import { convertNetworkToUnit, diff --git a/packages/manager/src/features/linodes/LinodesDetail/LinodeRescue/StandardRescueDialog.tsx b/packages/manager/src/features/linodes/LinodesDetail/LinodeRescue/StandardRescueDialog.tsx index 87b13f84175..539472fa157 100644 --- a/packages/manager/src/features/linodes/LinodesDetail/LinodeRescue/StandardRescueDialog.tsx +++ b/packages/manager/src/features/linodes/LinodesDetail/LinodeRescue/StandardRescueDialog.tsx @@ -9,7 +9,7 @@ import Paper from 'src/components/core/Paper'; import { makeStyles } from '@mui/styles'; import { Theme } from '@mui/material/styles'; import { Dialog } from 'src/components/Dialog/Dialog'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { Notice } from 'src/components/Notice/Notice'; import { resetEventsPolling } from 'src/eventsPolling'; import usePrevious from 'src/hooks/usePrevious'; diff --git a/packages/manager/src/features/linodes/LinodesDetail/LinodeSettings/LinodeConfigDialog.tsx b/packages/manager/src/features/linodes/LinodesDetail/LinodeSettings/LinodeConfigDialog.tsx index 667bb5fdee4..216b38f70ae 100644 --- a/packages/manager/src/features/linodes/LinodesDetail/LinodeSettings/LinodeConfigDialog.tsx +++ b/packages/manager/src/features/linodes/LinodesDetail/LinodeSettings/LinodeConfigDialog.tsx @@ -27,7 +27,7 @@ import { Theme } from '@mui/material/styles'; import Typography from 'src/components/core/Typography'; import { Dialog } from 'src/components/Dialog/Dialog'; import Select, { Item } from 'src/components/EnhancedSelect/Select'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import ExternalLink from 'src/components/ExternalLink'; import Grid from '@mui/material/Unstable_Grid2'; import { TooltipIcon } from 'src/components/TooltipIcon/TooltipIcon'; diff --git a/packages/manager/src/features/linodes/LinodesDetail/LinodeSummary/ActivitySummaryContent.tsx b/packages/manager/src/features/linodes/LinodesDetail/LinodeSummary/ActivitySummaryContent.tsx index 2de8f5e9e17..ddbf5cf3ea1 100644 --- a/packages/manager/src/features/linodes/LinodesDetail/LinodeSummary/ActivitySummaryContent.tsx +++ b/packages/manager/src/features/linodes/LinodesDetail/LinodeSummary/ActivitySummaryContent.tsx @@ -5,7 +5,7 @@ import Grid from '@mui/material/Unstable_Grid2'; import { createStyles, withStyles, WithStyles } from '@mui/styles'; import { Theme } from '@mui/material/styles'; import Typography from 'src/components/core/Typography'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import ActivityRow from './ActivityRow'; diff --git a/packages/manager/src/features/linodes/LinodesDetail/LinodeSummary/LinodeSummary.tsx b/packages/manager/src/features/linodes/LinodesDetail/LinodeSummary/LinodeSummary.tsx index d01f3ab35c4..86ae65e7906 100644 --- a/packages/manager/src/features/linodes/LinodesDetail/LinodeSummary/LinodeSummary.tsx +++ b/packages/manager/src/features/linodes/LinodesDetail/LinodeSummary/LinodeSummary.tsx @@ -7,7 +7,7 @@ import { createStyles, makeStyles, useTheme } from '@mui/styles'; import { Theme } from '@mui/material/styles'; import Typography from 'src/components/core/Typography'; import Select, { Item } from 'src/components/EnhancedSelect/Select'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import Grid from '@mui/material/Unstable_Grid2'; import LineGraph from 'src/components/LineGraph'; import { useWindowDimensions } from 'src/hooks/useWindowDimensions'; diff --git a/packages/manager/src/features/linodes/LinodesDetail/LinodesDetail.tsx b/packages/manager/src/features/linodes/LinodesDetail/LinodesDetail.tsx index 8671f9bc07c..d3346f8a117 100644 --- a/packages/manager/src/features/linodes/LinodesDetail/LinodesDetail.tsx +++ b/packages/manager/src/features/linodes/LinodesDetail/LinodesDetail.tsx @@ -15,7 +15,7 @@ import { LinodeDetailContextProvider, } from './linodeDetailContext'; import { useLinodeQuery } from 'src/queries/linodes/linodes'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { CircleProgress } from 'src/components/CircleProgress'; const LinodesDetailHeader = React.lazy( diff --git a/packages/manager/src/features/linodes/LinodesDetail/LinodesDetailNavigation.tsx b/packages/manager/src/features/linodes/LinodesDetail/LinodesDetailNavigation.tsx index fe2b770c5b1..95e4246593f 100644 --- a/packages/manager/src/features/linodes/LinodesDetail/LinodesDetailNavigation.tsx +++ b/packages/manager/src/features/linodes/LinodesDetail/LinodesDetailNavigation.tsx @@ -17,7 +17,7 @@ import SMTPRestrictionText from 'src/features/linodes/SMTPRestrictionText'; import { useLinodeQuery } from 'src/queries/linodes/linodes'; import { useTypeQuery } from 'src/queries/types'; import { CircleProgress } from 'src/components/CircleProgress'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; const LinodeSummary = React.lazy(() => import('./LinodeSummary/LinodeSummary')); const LinodeNetworking = React.lazy( diff --git a/packages/manager/src/features/linodes/LinodesLanding/LinodesLanding.tsx b/packages/manager/src/features/linodes/LinodesLanding/LinodesLanding.tsx index fb2c052cefd..7752f3b4f0a 100644 --- a/packages/manager/src/features/linodes/LinodesLanding/LinodesLanding.tsx +++ b/packages/manager/src/features/linodes/LinodesLanding/LinodesLanding.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import Box from 'src/components/core/Box'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import Hidden from 'src/components/core/Hidden'; import LandingHeader from 'src/components/LandingHeader'; import LinodeResize from '../LinodesDetail/LinodeResize/LinodeResize'; diff --git a/packages/manager/src/utilities/safeGetTabRender.tsx b/packages/manager/src/utilities/safeGetTabRender.tsx index 2456019e2e5..3338554f8ba 100644 --- a/packages/manager/src/utilities/safeGetTabRender.tsx +++ b/packages/manager/src/utilities/safeGetTabRender.tsx @@ -1,7 +1,7 @@ import { pathOr } from 'ramda'; import * as React from 'react'; -import ErrorState from 'src/components/ErrorState'; +import { ErrorState } from 'src/components/ErrorState/ErrorState'; import { reportException } from 'src/exceptionReporting'; import { CreateTypes } from 'src/store/linodeCreate/linodeCreate.actions'; From 1e8aba6e04a147bdc3f6e6c4a115c58a3d864b6d Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Tue, 16 May 2023 21:39:40 -0400 Subject: [PATCH 2/4] Add changeset --- .../manager/.changeset/pr-9128-tech-stories-1684287580449.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 packages/manager/.changeset/pr-9128-tech-stories-1684287580449.md diff --git a/packages/manager/.changeset/pr-9128-tech-stories-1684287580449.md b/packages/manager/.changeset/pr-9128-tech-stories-1684287580449.md new file mode 100644 index 00000000000..5a819a329d9 --- /dev/null +++ b/packages/manager/.changeset/pr-9128-tech-stories-1684287580449.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Tech Stories +--- + +MUI v5 Migration - `Components > ErrorState` ([#9128](https://github.com/linode/manager/pull/9128)) From 5b54475d9ed8b29c59e451ea36d80b79b9e2c7de Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Mon, 22 May 2023 11:05:41 -0400 Subject: [PATCH 3/4] Fix typo --- .../manager/src/components/ErrorState/ErrorState.stories.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/manager/src/components/ErrorState/ErrorState.stories.mdx b/packages/manager/src/components/ErrorState/ErrorState.stories.mdx index a32e548e1df..7f094c9557d 100644 --- a/packages/manager/src/components/ErrorState/ErrorState.stories.mdx +++ b/packages/manager/src/components/ErrorState/ErrorState.stories.mdx @@ -5,7 +5,7 @@ import { ErrorState } from 'src/components/ErrorState/ErrorState'; title="Features/Entity Landing Page/Error State" component={ErrorState} args={{ - errorText: 'An error has occured.', + errorText: 'An error has occurred.', compact: false, cozy: false, }} From c942c6ae9844fb2cb7a6c3ef7dfda8ffa92457b3 Mon Sep 17 00:00:00 2001 From: Jaalah Ramos Date: Mon, 22 May 2023 11:25:35 -0400 Subject: [PATCH 4/4] Update old boolean conversion --- packages/manager/src/components/ErrorState/ErrorState.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/manager/src/components/ErrorState/ErrorState.tsx b/packages/manager/src/components/ErrorState/ErrorState.tsx index 758fe4b3be6..61a02c78e3c 100644 --- a/packages/manager/src/components/ErrorState/ErrorState.tsx +++ b/packages/manager/src/components/ErrorState/ErrorState.tsx @@ -63,7 +63,7 @@ const ErrorStateRoot = styled(Grid)>( marginLeft: 0, padding: props.compact ? theme.spacing(5) - : !!props.cozy + : props.cozy ? theme.spacing(1) : theme.spacing(10), width: '100%',