mirror of
https://github.com/supabase/supabase.git
synced 2026-06-21 21:12:49 +08:00
feat: mobile connect tab (#22830)
* mobile connect tab * prettier changes
This commit is contained in:
@@ -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 },
|
||||
]
|
||||
|
||||
@@ -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 && (
|
||||
|
||||
Reference in New Issue
Block a user