File tree 2 files changed +11
-4
lines changed
components/layouts/ProjectSettingsLayout
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change
1
+ import { ArrowUpRight } from 'lucide-react'
2
+
1
3
import type { ProductMenuGroup } from 'components/ui/ProductMenu/ProductMenu.types'
2
4
import type { Project } from 'data/projects/project-detail-query'
3
5
import { IS_PLATFORM , PROJECT_STATUS } from 'lib/constants'
4
6
import type { Organization } from 'types'
5
- import { ArrowUpRight } from 'lucide-react'
6
- import { useFlag } from 'hooks/ui/useFlag'
7
7
8
8
export const generateSettingsMenu = (
9
9
ref ?: string ,
@@ -27,6 +27,7 @@ export const generateSettingsMenu = (
27
27
const storageEnabled = features ?. storage ?? true
28
28
const warehouseEnabled = features ?. warehouse ?? false
29
29
const logDrainsEnabled = features ?. logDrains ?? false
30
+ const newDiskComputeEnabled = features ?. diskAndCompute ?? false
30
31
31
32
return [
32
33
{
@@ -38,7 +39,7 @@ export const generateSettingsMenu = (
38
39
url : `/project/${ ref } /settings/general` ,
39
40
items : [ ] ,
40
41
} ,
41
- ...( IS_PLATFORM && features ?. diskAndCompute
42
+ ...( IS_PLATFORM && newDiskComputeEnabled
42
43
? [
43
44
{
44
45
name : 'Compute and Disk' ,
Original file line number Diff line number Diff line change 1
1
import { useContext } from 'react'
2
-
3
2
import FlagContext from 'components/ui/Flag/FlagContext'
3
+ import { useSelectedProject } from 'hooks/misc/useSelectedProject'
4
4
5
5
export function useFlag < T = boolean > ( name : string ) {
6
+ const project = useSelectedProject ( )
6
7
const store : any = useContext ( FlagContext )
7
8
9
+ // Temporary override as Fly projects are cant seem to upgrade their compute with the new disk UI
10
+ if ( name === 'diskAndComputeForm' && project ?. cloud_provider === 'FLY' ) {
11
+ return false
12
+ }
13
+
8
14
const isObjectEmpty = ( objectName : Object ) => {
9
15
return Object . keys ( objectName ) . length === 0
10
16
}
You can’t perform that action at this time.
0 commit comments