Skip to content

Commit

Permalink
fix: disable support for mfb for mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin9foong committed Nov 29, 2024
1 parent 94b1c79 commit 6187c37
Showing 1 changed file with 19 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
Tooltip,
} from '@chakra-ui/react'

import { useIsMobile } from '~hooks/useIsMobile'
import { Tab } from '~components/Tabs'

import { useCreatePageSidebar } from '~features/admin-form/create/common/CreatePageSidebarContext'
Expand All @@ -32,21 +33,24 @@ import {
PaymentsInputPanel,
} from './field-panels'

const MagicFormBuilderButton = ({ ...styleProps }) => (
<Tooltip openDelay={800} hasArrow label="Create fields with AI">
<Button
padding="0"
backgroundColor="primary.200"
_hover={{
backgroundColor: 'primary.300',
}}
borderWidth={0}
{...styleProps}
>
<Icon as={BiSolidMagicWand} color="primary.500" fontSize="1.5rem" />
</Button>
</Tooltip>
)
const MagicFormBuilderButton = ({ ...styleProps }) => {
const isMobile = useIsMobile()
return !isMobile ? (
<Tooltip openDelay={800} hasArrow label="Create fields with AI">
<Button
padding="0"
backgroundColor="primary.200"
_hover={{
backgroundColor: 'primary.300',
}}
borderWidth={0}
{...styleProps}
>
<Icon as={BiSolidMagicWand} color="primary.500" fontSize="1.5rem" />
</Button>
</Tooltip>
) : null
}

const FieldSearchBar = ({
searchValue,
Expand Down

0 comments on commit 6187c37

Please sign in to comment.