@@ -38,7 +38,6 @@ import {
38
38
TableRowSkeleton ,
39
39
} from "components/TableLoader/TableLoader" ;
40
40
import { useClickableTableRow } from "hooks/useClickableTableRow" ;
41
- import { useDashboard } from "modules/dashboard/useDashboard" ;
42
41
import { linkToTemplate , useLinks } from "modules/navigation" ;
43
42
import type { FC } from "react" ;
44
43
import { useNavigate } from "react-router-dom" ;
@@ -193,31 +192,27 @@ export const TemplatesPageView: FC<TemplatesPageViewProps> = ({
193
192
examples,
194
193
templates,
195
194
} ) => {
196
- const { experiments } = useDashboard ( ) ;
197
195
const isLoading = ! templates ;
198
196
const isEmpty = templates && templates . length === 0 ;
199
197
const navigate = useNavigate ( ) ;
200
- const multiOrgExperimentEnabled = experiments . includes ( "multi-organization" ) ;
201
198
202
- const createTemplateAction = ( ) => {
203
- return multiOrgExperimentEnabled ? (
204
- < Button
205
- startIcon = { < AddIcon /> }
206
- variant = "contained"
207
- onClick = { ( ) => {
208
- navigate ( "/starter-templates" ) ;
209
- } }
210
- >
211
- Create Template
212
- </ Button >
213
- ) : (
214
- < CreateTemplateButton onNavigate = { navigate } />
215
- ) ;
216
- } ;
199
+ const createTemplateAction = showOrganizations ? (
200
+ < Button
201
+ startIcon = { < AddIcon /> }
202
+ variant = "contained"
203
+ onClick = { ( ) => {
204
+ navigate ( "/starter-templates" ) ;
205
+ } }
206
+ >
207
+ Create Template
208
+ </ Button >
209
+ ) : (
210
+ < CreateTemplateButton onNavigate = { navigate } />
211
+ ) ;
217
212
218
213
return (
219
214
< Margins >
220
- < PageHeader actions = { canCreateTemplates && createTemplateAction ( ) } >
215
+ < PageHeader actions = { canCreateTemplates && createTemplateAction } >
221
216
< PageHeaderTitle >
222
217
< Stack spacing = { 1 } direction = "row" alignItems = "center" >
223
218
Templates
0 commit comments