feat: mobile connect tab (#22830)

* mobile connect tab

* prettier changes
This commit is contained in:
hallidayo
2024-05-13 12:32:00 +01:00
committed by GitHub
parent 74c7eb40ce
commit b17841ced1
2 changed files with 15 additions and 2 deletions

View File

@@ -175,6 +175,9 @@ export const FRAMEWORKS: ConnectionType[] = [
},
],
},
]
export const MOBILES: ConnectionType[] = [
{
key: 'exporeactnative',
label: 'Expo React Native',
@@ -225,5 +228,6 @@ export const ORMS: ConnectionType[] = [
export const CONNECTION_TYPES = [
{ key: 'frameworks', label: 'App Frameworks', obj: FRAMEWORKS },
{ key: 'mobiles', label: 'Mobile Frameworks', obj: MOBILES },
{ key: 'orms', label: 'ORMs', obj: ORMS },
]

View File

@@ -26,7 +26,7 @@ import { useProjectApiQuery } from 'data/config/project-api-query'
import { useProjectSettingsQuery } from 'data/config/project-settings-query'
import { useCheckPermissions } from 'hooks'
import { DEFAULT_PROJECT_API_SERVICE_ID } from 'lib/constants'
import { CONNECTION_TYPES, ConnectionType, FRAMEWORKS, ORMS } from './Connect.constants'
import { CONNECTION_TYPES, ConnectionType, FRAMEWORKS, MOBILES, ORMS } from './Connect.constants'
import { getContentFilePath } from './Connect.utils'
import ConnectDropdown from './ConnectDropdown'
import ConnectTabContent from './ConnectTabContent'
@@ -98,6 +98,11 @@ const Connect = () => {
handleConnectionTypeChange(FRAMEWORKS)
}
if (type === 'mobiles') {
setConnectionObject(MOBILES)
handleConnectionTypeChange(MOBILES)
}
if (type === 'orms') {
setConnectionObject(ORMS)
handleConnectionTypeChange(ORMS)
@@ -208,7 +213,11 @@ const Connect = () => {
<ConnectDropdown
state={selectedParent}
updateState={handleParentChange}
label={connectionObject === FRAMEWORKS ? 'Framework' : 'Tool'}
label={
connectionObject === FRAMEWORKS || connectionObject === MOBILES
? 'Framework'
: 'Tool'
}
items={connectionObject}
/>
{selectedParent && hasChildOptions && (