@@ -30,6 +30,7 @@ import { ApiType } from "../../../../../../../schema/src/app/components/ModelApi
30
30
import { useGetDomainsQuery } from "../../../../../../../../shell/services/accounts" ;
31
31
import { useFilePath } from "../../../../../../../../shell/hooks/useFilePath" ;
32
32
import { DeleteItemDialog } from "./DeleteItemDialog" ;
33
+ import { useGetContentModelsQuery } from "../../../../../../../../shell/services/instance" ;
33
34
34
35
export const MoreMenu = ( ) => {
35
36
const { modelZUID, itemZUID } = useParams < {
@@ -51,6 +52,9 @@ export const MoreMenu = () => {
51
52
const instance = useSelector ( ( state : AppState ) => state . instance ) ;
52
53
const { data : domains } = useGetDomainsQuery ( ) ;
53
54
const codePath = useFilePath ( modelZUID ) ;
55
+ const { data : contentModels } = useGetContentModelsQuery ( ) ;
56
+ const type =
57
+ contentModels ?. find ( ( model ) => model . ZUID === modelZUID ) ?. type ?? "" ;
54
58
55
59
const handleCopyClick = ( data : string ) => {
56
60
navigator ?. clipboard
@@ -132,18 +136,20 @@ export const MoreMenu = () => {
132
136
View Quick Access API
133
137
< KeyboardArrowRightRounded color = "action" sx = { { ml : "auto" } } />
134
138
</ MenuItem >
135
- < MenuItem
136
- onClick = { ( event ) => {
137
- setShowApiEndpoints ( event . currentTarget ) ;
138
- setApiEndpointType ( "site-generators" ) ;
139
- } }
140
- >
141
- < ListItemIcon >
142
- < DataObjectRounded />
143
- </ ListItemIcon >
144
- View Site Generators API
145
- < KeyboardArrowRightRounded color = "action" sx = { { ml : "auto" } } />
146
- </ MenuItem >
139
+ { type !== "dataset" && (
140
+ < MenuItem
141
+ onClick = { ( event ) => {
142
+ setShowApiEndpoints ( event . currentTarget ) ;
143
+ setApiEndpointType ( "site-generators" ) ;
144
+ } }
145
+ >
146
+ < ListItemIcon >
147
+ < DataObjectRounded />
148
+ </ ListItemIcon >
149
+ View Site Generators API
150
+ < KeyboardArrowRightRounded color = "action" sx = { { ml : "auto" } } />
151
+ </ MenuItem >
152
+ ) }
147
153
< MenuItem
148
154
onClick = { ( ) => {
149
155
history . push ( `/schema/${ modelZUID } ` ) ;
0 commit comments