diff --git a/nginx/vue/src/components/admin/CreateFavorite.vue b/nginx/vue/src/components/admin/CreateFavorite.vue index a9d1ed7..a0a31aa 100644 --- a/nginx/vue/src/components/admin/CreateFavorite.vue +++ b/nginx/vue/src/components/admin/CreateFavorite.vue @@ -2,7 +2,6 @@ import Button from "@/components/input/Button.vue"; import { ref } from "vue"; -import { useAuthStore } from "@/stores/auth"; import axios from "axios"; const type = ref(""); diff --git a/nginx/vue/src/components/home/Consumption.vue b/nginx/vue/src/components/home/Consumption.vue index e89407b..08b1018 100644 --- a/nginx/vue/src/components/home/Consumption.vue +++ b/nginx/vue/src/components/home/Consumption.vue @@ -3,88 +3,16 @@ import AutoScroll from "@/components/util/AutoScroll.vue"; import OptionalLinkTable from "@/components/util/OptionalLinkTable.vue"; import Header from "@/components/text/Header.vue"; -const data = [ - { - type: "Anime", - name: "Cowboy bebop", - }, - { - type: "Game", - name: "Rounds", - link: "https://store.steampowered.com/app/1557740/ROUNDS/", - }, - { - type: "Boardgame", - name: "Root", - }, - { - type: "Game", - name: "The farmer was replaced", - link: "https://store.steampowered.com/app/2060160/The_Farmer_Was_Replaced/", - }, - { - type: "Game", - name: "Higurashi When They Cry Hou - Ch.1", - link: "https://store.steampowered.com/app/310360/Higurashi_When_They_Cry_Hou__Ch1_Onikakushi/", - }, - { - type: "Substack", - name: "By Ellie", - link: "https://oceandrops.substack.com/p/japan-is-what-late-stage-capitalist?utm_source=%2Finbox&utm_medium=reader2", - }, - { - type: "Substack", - name: "By Cricket Guest", - link: "https://finalgirldigital.substack.com/p/the-diet-coke-essay?utm_source=%2Finbox&utm_medium=reader2", - }, - { - type: "Book", - name: "The Defining Decade", - }, - { - type: "Movie", - name: "Funny Pages", - }, - { - type: "Series", - name: "Curb Your Enthusiasm", - }, - { - type: "Game", - name: "Hatsune Miku: Project Mirai DX", - }, - { - type: "Movie", - name: "Redline", - }, - { - type: "Game", - name: "Persona 5 Royal", - }, - { - type: "Anime", - name: "GTO", - }, - { - type: "Anime", - name: "Revolutionary Girl Utena", - }, - { - type: "Anime", - name: "Chainsaw man", - }, - { - type: "Anime", - name: "Azumanga Daioh", - }, -]; +import { useActivityStore } from "@/stores/activity"; + +const activityStore = useActivityStore(); diff --git a/nginx/vue/src/components/home/Favorites.vue b/nginx/vue/src/components/home/Favorites.vue index c484d2d..17b52a2 100644 --- a/nginx/vue/src/components/home/Favorites.vue +++ b/nginx/vue/src/components/home/Favorites.vue @@ -2,71 +2,20 @@ import Header from "@/components/text/Header.vue"; import OptionalLinkTable from "@/components/util/OptionalLinkTable.vue"; import AutoScroll from "@/components/util/AutoScroll.vue"; -const favs = [ - { - type: "Daioh", - name: "Tomo", - }, - { - type: "Color", - name: "Teal", - }, - { - type: "Pet", - name: "Cat", - }, - { - type: "Subject", - name: "Math", - }, - { - type: "Drink", - name: "Monster", - }, - { - type: "Sport", - name: "Running", - }, - { - type: "Anime", - name: "Evangelion", - }, - { - type: "Ingredient", - name: "Eggs", - }, - { - type: "OS", - name: "Linux", - }, - { - type: "Fruit", - name: "Satsumas", - }, - { - type: "Vegetable", - name: "Cucumber", - }, - { - type: "Hobby", - name: "Climbing", - }, - { - type: "Season", - name: "Summer", - }, - { - type: "Language", - name: "Rust", - }, -]; + +import { useFavoritesStore } from "@/stores/favorites"; + +const favoritesStore = useFavoritesStore(); diff --git a/nginx/vue/src/components/home/Feed.vue b/nginx/vue/src/components/home/Feed.vue index 9c309a6..2cff804 100644 --- a/nginx/vue/src/components/home/Feed.vue +++ b/nginx/vue/src/components/home/Feed.vue @@ -3,7 +3,7 @@ import Button from "@/components/input/Button.vue"; import Markdown from "@/components/util/Markdown.vue"; import Header from "@/components/text/Header.vue"; -import { ref, computed, onMounted } from "vue"; +import { ref, computed, onBeforeMount } from "vue"; import { useAuthStore } from "@/stores/auth"; import { usePostsStore } from "@/stores/posts"; @@ -36,7 +36,7 @@ function deletePost() { postsStore.deletePost(post.value); } -onMounted(() => { +onBeforeMount(() => { postsStore.fetchPosts(); });