zhoujinsong commented on code in PR #4118:
URL: https://github.com/apache/amoro/pull/4118#discussion_r2993237134


##########
amoro-web/src/views/catalogs/index.vue:
##########
@@ -39,6 +40,7 @@ const curCatalog = reactive<ICatalogItem>({
 const isEdit = ref<boolean>(false)
 const NEW_CATALOG = 'new catalog'
 const loading = ref<boolean>(false)
+const writable = ref<boolean>(canManageCatalog())

Review Comment:
   **[Minor] `writable` is a non-reactive plain `ref`, not a `computed`**
   
   `const writable = ref<boolean>(canManageCatalog())` captures the privilege 
value at component mount time. If the store's `privileges` array is updated 
after mount (e.g., after a re-login within the same SPA session), `writable` 
will not update.
   
   `Detail.vue` does this correctly with `computed(() => canManageCatalog())`. 
Please align `catalogs/index.vue` to use `computed` as well.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to