Skip to content

Commit

Permalink
refactor(DataSecurityBox): reactive state
Browse files Browse the repository at this point in the history
  • Loading branch information
floryst committed Nov 13, 2023
1 parent e6392ee commit e9dd799
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/DataSecurityBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import {
errorReportingConfigured,
useErrorReporting,
} from '@/src/utils/errorReporting';
import { watch, ref } from 'vue';
import { computed } from 'vue';
const errorStore = useErrorReporting();
const reportingEnabled = ref(!errorStore.disableReporting);
watch(reportingEnabled, (enabled) => {
errorStore.disableReporting = !enabled;
const reportingEnabled = computed({
get: () => !errorStore.disableReporting,
set: (enabled) => {
errorStore.disableReporting = !enabled;
},
});
</script>

Expand Down

0 comments on commit e9dd799

Please sign in to comment.