From 1aba33f7581714e70c1d06b53bd62e02eede489a Mon Sep 17 00:00:00 2001 From: Alban Bailly Date: Wed, 4 Dec 2024 14:35:15 -0500 Subject: [PATCH] feedback @mjac0bs --- .../src/features/TopMenu/CreateMenu/CreateMenu.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/manager/src/features/TopMenu/CreateMenu/CreateMenu.tsx b/packages/manager/src/features/TopMenu/CreateMenu/CreateMenu.tsx index 7689934a1e2..85e0d5cd3cc 100644 --- a/packages/manager/src/features/TopMenu/CreateMenu/CreateMenu.tsx +++ b/packages/manager/src/features/TopMenu/CreateMenu/CreateMenu.tsx @@ -1,7 +1,7 @@ import { Box, Button, Divider } from '@linode/ui'; import KeyboardArrowDown from '@mui/icons-material/KeyboardArrowDown'; import KeyboardArrowUp from '@mui/icons-material/KeyboardArrowUp'; -import { Popover, Stack, useMediaQuery, useTheme } from '@mui/material'; +import { Popover, Stack, useMediaQuery } from '@mui/material'; import * as React from 'react'; import BucketIcon from 'src/assets/icons/entityIcons/bucket.svg'; @@ -14,6 +14,7 @@ import { useIsPlacementGroupsEnabled } from 'src/features/PlacementGroups/utils' import { StyledMenuList, StyledPaper, StyledStack } from './CreateMenu.styles'; import { ProductFamilyGroup } from './ProductFamilyGroup'; +import type { Theme } from '@mui/material'; import type { BaseNavLink } from 'src/components/PrimaryNav/PrimaryLink'; import type { ProductFamilyLinkGroup } from 'src/components/PrimaryNav/PrimaryNav'; @@ -39,8 +40,9 @@ export interface CreateMenuLink extends BaseNavLink { export const CreateMenu = () => { const [anchorEl, setAnchorEl] = React.useState(null); const open = Boolean(anchorEl); - const theme = useTheme(); - const isSmallScreen = useMediaQuery(theme.breakpoints.down('md')); + const isSmallScreen = useMediaQuery((theme: Theme) => + theme.breakpoints.down('md') + ); const { isDatabasesEnabled } = useIsDatabasesEnabled(); const { isPlacementGroupsEnabled } = useIsPlacementGroupsEnabled();