diff --git a/packages/manager/src/App.tsx b/packages/manager/src/App.tsx index 53bb30404a5..a93a31f4794 100644 --- a/packages/manager/src/App.tsx +++ b/packages/manager/src/App.tsx @@ -277,8 +277,6 @@ export class App extends React.Component { {this.props.featureFlagsLoading ? null : ( diff --git a/packages/manager/src/MainContent.tsx b/packages/manager/src/MainContent.tsx index 671a9e97485..66b40dda4dd 100644 --- a/packages/manager/src/MainContent.tsx +++ b/packages/manager/src/MainContent.tsx @@ -1,11 +1,10 @@ -import classNames from 'classnames'; import { isEmpty } from 'ramda'; import * as React from 'react'; -import { Redirect, Route, RouteComponentProps, Switch } from 'react-router-dom'; +import { Redirect, Route, Switch } from 'react-router-dom'; import { compose } from 'recompose'; import Logo from 'src/assets/logo/akamai-logo.svg'; import Box from 'src/components/core/Box'; -import { makeStyles, withTheme, WithTheme } from '@mui/styles'; +import { makeStyles } from 'tss-react/mui'; import { Theme } from '@mui/material/styles'; import Grid from '@mui/material/Unstable_Grid2'; import MainContentBanner from 'src/components/MainContentBanner'; @@ -36,7 +35,7 @@ import { complianceUpdateContext } from './context/complianceUpdateContext'; import { FlagSet } from './featureFlags'; import { ManagerPreferences } from 'src/types/ManagerPreferences'; -const useStyles = makeStyles((theme: Theme) => ({ +const useStyles = makeStyles()((theme: Theme) => ({ appFrame: { position: 'relative', display: 'flex', @@ -45,15 +44,6 @@ const useStyles = makeStyles((theme: Theme) => ({ backgroundColor: theme.bg.app, zIndex: 1, }, - wrapper: { - padding: theme.spacing(3), - transition: theme.transitions.create('opacity'), - [theme.breakpoints.down('md')]: { - paddingTop: theme.spacing(2), - paddingLeft: theme.spacing(2), - paddingRight: theme.spacing(2), - }, - }, cmrWrapper: { maxWidth: `${theme.breakpoints.values.lg}px !important`, padding: `${theme.spacing(3)} 0`, @@ -135,13 +125,11 @@ const useStyles = makeStyles((theme: Theme) => ({ })); interface Props { - location: RouteComponentProps['location']; - history: RouteComponentProps['history']; appIsLoading: boolean; isLoggedInAsCustomer: boolean; } -type CombinedProps = Props & GlobalErrorProps & WithTheme; +type CombinedProps = Props & GlobalErrorProps; const Account = React.lazy(() => import('src/features/Account')); const LinodesRoutes = React.lazy(() => import('src/features/linodes')); @@ -175,8 +163,8 @@ const AccountActivationLanding = React.lazy( const Firewalls = React.lazy(() => import('src/features/Firewalls')); const Databases = React.lazy(() => import('src/features/Databases')); -const MainContent: React.FC = (props) => { - const classes = useStyles(); +const MainContent = (props: CombinedProps) => { + const { classes, cx } = useStyles(); const flags = useFlags(); const { data: preferences } = usePreferences(); @@ -259,7 +247,7 @@ const MainContent: React.FC = (props) => { */ return (