Commit 74927a2f authored by shampton's avatar shampton

Switch feature flag from store to mixin

Switch to using the glFeatureFlag mixin instead of
setting it in the store.
parent 0d72eb15
......@@ -4,6 +4,7 @@ import ArtifactsApp from './artifacts_list_app.vue';
import Deployment from './deployment.vue';
import MrWidgetContainer from './mr_widget_container.vue';
import MrWidgetPipeline from './mr_widget_pipeline.vue';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
/**
* Renders the pipeline and related deployments from the store.
......@@ -23,6 +24,7 @@ export default {
MergeTrainPositionIndicator: () =>
import('ee_component/vue_merge_request_widget/components/merge_train_position_indicator.vue'),
},
mixins: [glFeatureFlagsMixin()],
props: {
mr: {
type: Object,
......@@ -62,7 +64,7 @@ export default {
return this.isPostMerge ? this.mr.mergePipeline : this.mr.pipeline;
},
showVisualReviewAppLink() {
return this.mr.visualReviewAppAvailable && this.mr.visualReviewFF;
return this.mr.visualReviewAppAvailable && this.glFeatures.anonymousVisualReviewFeedback;
},
showMergeTrainPositionIndicator() {
return _.isNumber(this.mr.mergeTrainIndex);
......
......@@ -31,7 +31,6 @@ export default class MergeRequestStore extends CEMergeRequestStore {
this.canDismissVulnerability = Boolean(this.createVulnerabilityFeedbackDismissalPath);
this.canCreateFeedback = data.can_create_feedback || false;
this.visualReviewAppAvailable = Boolean(data.visual_review_app_available);
this.visualReviewFF = gon && gon.features && gon.features.anonymousVisualReviewFeedback;
this.appUrl = gon && gon.gitlab_url;
this.initCodeclimate(data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment