Skip to content

Commit

Permalink
redirect to the brokers main page from the external broker creation p…
Browse files Browse the repository at this point in the history
…age if the externalBroker feature flag is not set
  • Loading branch information
cstns committed Feb 11, 2025
1 parent a0070a9 commit 0a19e87
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions frontend/src/pages/team/Brokers/NewBroker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,21 @@

<script>
import { mapGetters } from 'vuex'
import BrokerForm from './components/BrokerForm.vue'
export default {
name: 'NewBroker',
components: { BrokerForm },
computed: {
...mapGetters('account', ['featuresCheck'])
},
mounted () {
if (!this.featuresCheck.isExternalMqttBrokerFeatureEnabled) {
this.$router.push({ name: 'team-brokers' })
}
},
methods: {
onSubmit (payload) {
return this.$store.dispatch('product/createBroker', payload)
Expand Down

0 comments on commit 0a19e87

Please sign in to comment.