Skip to content

Commit b6687e4

Browse files
luannmoreiragustavosbarreto
authored andcommitted
fix(ui): toggle version panel using env flag
Use computed `openVersion` to reflect `isCommunity` from env vars. This enables conditional UI behavior based on environment config.
1 parent 495c4e7 commit b6687e4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ui/src/components/Namespace/NamespaceAdd.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,19 @@
6868
</template>
6969

7070
<script setup lang="ts">
71-
import { computed, ref } from "vue";
71+
import { computed } from "vue";
7272
import { useField } from "vee-validate";
7373
import * as yup from "yup";
7474
import axios, { AxiosError } from "axios";
7575
import { useStore } from "@/store";
7676
import handleError from "@/utils/handleError";
7777
import useSnackbar from "@/helpers/snackbar";
78+
import { envVariables } from "@/envVariables";
7879
7980
const store = useStore();
8081
const snackbar = useSnackbar();
8182
const model = defineModel({ default: false });
82-
const openVersion = ref(false);
83+
const openVersion = computed(() => envVariables.isCommunity);
8384
8485
// Validation schema for namespace name
8586
const namespaceSchema = yup

0 commit comments

Comments
 (0)