Skip to content

Commit a378f22

Browse files
committed
Refactor FormView to remove license status loading logic, as it is now managed by Core.js during initialization. This change simplifies the component and enhances maintainability.
1 parent 8d9c367 commit a378f22

1 file changed

Lines changed: 3 additions & 18 deletions

File tree

src/ui/views/form/FormView.js

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import './FormView.css'
22

33
import Element from 'src/ui/Element'
44
import Tracking from "src/utils/Tracking"
5-
import { shouldShowCountdown, getCountdownSeconds, setCachedLicenseStatus } from 'src/payments/gate'
5+
import { shouldShowCountdown, getCountdownSeconds } from 'src/payments/gate'
66
import '../countdown/CountdownView'
77

88
class FormView extends Element {
@@ -12,23 +12,8 @@ class FormView extends Element {
1212
this.data.pendingCommand = null
1313
this.data.showingCountdown = false
1414

15-
// Load license status for gate decisions from props
16-
this.loadLicenseFromProps()
17-
}
18-
19-
loadLicenseFromProps() {
20-
const licenseAttr = this.getAttribute('license')
21-
if (licenseAttr && licenseAttr !== '{}') {
22-
try {
23-
const license = JSON.parse(licenseAttr.replace(/"/g, '"').replace(/'/g, "'"))
24-
setCachedLicenseStatus(license)
25-
} catch (e) {
26-
console.warn('[FormView] Failed to parse license data:', e)
27-
setCachedLicenseStatus(null)
28-
}
29-
} else {
30-
setCachedLicenseStatus(null)
31-
}
15+
// License status is managed by Core.js during initialization
16+
// No need to update cache from FormView
3217
}
3318

3419
handleEmptyState(selection) {

0 commit comments

Comments
 (0)