Skip to content

Commit

Permalink
refactor: [M3-6308] - MUI v5 Migration - `Components > CreateLinodeDi…
Browse files Browse the repository at this point in the history
…sabled` (linode#9015)

* move notice directly into Linode Create and remove component

* use `&&`

---------

Co-authored-by: Banks Nussman <banks@nussman.us>
  • Loading branch information
bnussman-akamai and bnussman authored Apr 19, 2023
1 parent 7c7d08b commit f4fbcf0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 28 deletions.

This file was deleted.

2 changes: 0 additions & 2 deletions packages/manager/src/components/CreateLinodeDisabled/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import Paper from 'src/components/core/Paper';
import TabPanels from 'src/components/core/ReachTabPanels';
import Tabs from 'src/components/core/ReachTabs';
import Typography from 'src/components/core/Typography';
import CreateLinodeDisabled from 'src/components/CreateLinodeDisabled';
import DocsLink from 'src/components/DocsLink';
import ErrorState from 'src/components/ErrorState';
import Grid from '@mui/material/Unstable_Grid2';
Expand Down Expand Up @@ -573,7 +572,15 @@ export class LinodeCreate extends React.PureComponent<
<Notice error spacingTop={8} text={hasErrorFor.none} />
)}
{generalError && <Notice error spacingTop={8} text={generalError} />}
<CreateLinodeDisabled isDisabled={userCannotCreateLinode} />
{userCannotCreateLinode && (
<Notice
text={
"You don't have permissions to create a new Linode. Please contact an account administrator for details."
}
error
important
/>
)}
<Tabs defaultIndex={selectedTab} onChange={this.handleTabChange}>
<TabLinkList tabs={this.tabs} />
<TabPanels>
Expand Down

0 comments on commit f4fbcf0

Please sign in to comment.