Skip to content

Commit 883b844

Browse files
committed
addressing comments
1 parent ebb2211 commit 883b844

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

frontend/common/utils/utils.tsx

+2-5
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,7 @@ const Utils = Object.assign({}, require('./base/_utils'), {
354354
if (plan && plan.includes('start-up')) {
355355
return planNames.startup
356356
}
357-
if (
358-
global.flagsmithVersion?.backend.is_enterprise ||
359-
(plan && plan.includes('enterprise'))
360-
) {
357+
if (Utils.isEnterpriseImage() || (plan && plan.includes('enterprise'))) {
361358
return planNames.enterprise
362359
}
363360
return planNames.free
@@ -555,6 +552,7 @@ const Utils = Object.assign({}, require('./base/_utils'), {
555552
getViewIdentitiesPermission() {
556553
return 'VIEW_IDENTITIES'
557554
},
555+
isEnterpriseImage: () => global.flagsmithVersion?.backend.is_enterprise,
558556
isMigrating() {
559557
const model = ProjectStore.model as null | ProjectType
560558
if (
@@ -566,7 +564,6 @@ const Utils = Object.assign({}, require('./base/_utils'), {
566564
return false
567565
},
568566
isSaas: () => global.flagsmithVersion?.backend?.is_saas,
569-
570567
isValidNumber(value: any) {
571568
return /^-?\d*\.?\d+$/.test(`${value}`)
572569
},

frontend/web/components/AdminAPIKeys.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export class CreateAPIKey extends PureComponent {
190190
<Input
191191
ref={(v) => {
192192
setTimeout(() => {
193-
v?.focus()
193+
v.focus()
194194
}, 500)
195195
}}
196196
value={this.state.name}

frontend/web/components/LicensingTabContent.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const LicensingTabContent: React.FC<LicensingTabContentProps> = ({
2828
toast(
2929
Array.isArray(error?.data)
3030
? error?.data[0]
31-
: 'Upload was not successfull',
31+
: 'Upload was not successful',
3232
'danger',
3333
)
3434
}

frontend/web/components/pages/OrganisationSettingsPage.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,8 @@ const OrganisationSettingsPage = class extends Component {
231231
const { chargebee_email } = subscriptionMeta || {}
232232

233233
const displayedTabs = []
234-
const isEnterprise =
235-
global.flagsmithVersion?.backend.is_enterprise
236-
const isSaas = global.flagsmithVersion?.backend?.isSaas
234+
const isEnterprise = Utils.isEnterpriseImage()
235+
const isSaas = Utils.isSaas()
237236

238237
if (
239238
AccountStore.getUser() &&

0 commit comments

Comments
 (0)