🔧 Refactor computed property for better readability
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<component :is="Component" />
|
||||
</Transition>
|
||||
</router-view>
|
||||
<!-- Developer Tools Panel (development only) -->
|
||||
<!-- Developer Tools Panel (development + authenticated production) -->
|
||||
<DeveloperTools />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -135,7 +135,8 @@ const isOpen = ref(false);
|
||||
// Show in development mode or when authenticated in production
|
||||
const isAvailable = computed(() => {
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const isAuthenticatedInProduction = process.env.NODE_ENV === 'production' && user.value;
|
||||
const isAuthenticatedInProduction =
|
||||
process.env.NODE_ENV === 'production' && user.value;
|
||||
return isDev || isAuthenticatedInProduction;
|
||||
});
|
||||
const nodeEnv = computed(() => process.env.NODE_ENV || 'unknown');
|
||||
|
||||
Reference in New Issue
Block a user