import { computed } from '@ember/object';
import Component from '@glimmer/component';

import Feature from 'ol/Feature';

export default class ContestLayerFeature extends Component {
  @computed
  get feature() {
    let contest = this.args.contest;
    return new Feature({
      geometry: contest.geometry,
      isTriangle: contest.isTriangle,
    });
  }

  constructor() {
    super(...arguments);
    this.args.source.addFeature(this.feature);
  }

  willDestroy() {
    super.willDestroy(...arguments);
    this.args.source.removeFeature(this.feature);
  }
}

@@ -1,46 +1,4 @@
-import %7B computed %7D from '@ember/object';%0A
 impo
@@ -140,51 +140,79 @@
 %7B%0A  
-@
 co
-mputed%0A  get feature() %7B%0A    let contest
+nstructor() %7B%0A    super(...arguments);%0A%0A    const %7B contest, source %7D
  = t
@@ -223,82 +223,30 @@
 args
-.contest
 ;%0A
+%0A
     
-return new Feature(%7B%0A      geometry: contest.geometry,%0A     
+let %7B geometry,
  isT
@@ -256,17 +256,20 @@
 ngle
-:
+ %7D =
  contest
 .isT
@@ -268,91 +268,73 @@
 test
-.isTriangle,%0A    %7D);%0A  %7D%0A%0A  constructor() %7B%0A    super(...arguments
+;%0A    this.feature = new Feature(%7B geometry, isTriangle %7D
 );%0A
+%0A
     
-this.args.
 sour

Replace unnecessary computed property