analysis sidebar is importing activeCategory properly

This commit is contained in:
Annika
2022-07-14 09:46:19 -06:00
parent daaf5173a6
commit c6a36f54a9
2 changed files with 11 additions and 3 deletions
+8 -2
View File
@@ -1,15 +1,21 @@
<template> <template>
<div class="component"> <div class="component">
Analysis Container
<p>{{category.name}}</p>
</div> </div>
</template> </template>
<script> <script>
import { computed, reactive, onMounted, ref, watchEffect } from "vue";
import { AppState } from '../AppState'
export default { export default {
setup(){ setup(){
return {} return {
category: computed(() => AppState.activeCategory)
}
} }
} }
</script> </script>
+3 -1
View File
@@ -9,7 +9,9 @@
</form> </form>
</div> </div>
<div class="flex md:mt-6 md:mx-40 flex-col md:flex-row"> <div class="flex md:mt-6 md:mx-40 flex-col md:flex-row">
<div class="md:w-4/12 md:order-last my-4 md:my-0 bg-stone-800">analysis container</div> <div class="md:w-4/12 md:order-last my-4 md:my-0 bg-stone-800">
<Analysis />
</div>
<div class="md:w-8/12 md:mr-4"> <div class="md:w-8/12 md:mr-4">
<div class="flex justify-between bg-stone-700 text-green-300 hover:bg-green-200 hover:text-stone-900 mb-2 p-2 pr-0"> <div class="flex justify-between bg-stone-700 text-green-300 hover:bg-green-200 hover:text-stone-900 mb-2 p-2 pr-0">
<h3 class="text-2xl font-semibold">Category</h3> <h3 class="text-2xl font-semibold">Category</h3>