Cleanup old code

This commit is contained in:
2025-08-29 22:58:09 -04:00
parent 485e04afe2
commit 926617056f

View File

@@ -12,17 +12,12 @@ export default {
return { return {
ascending: this.ascending, ascending: this.ascending,
filter: window.location.href.split("filter=")[1] || "", filter: window.location.href.split("filter=")[1] || "",
isLoading: false,
sortColumn: this.sortColumn, sortColumn: this.sortColumn,
topics: [], topics: [],
}; };
}, },
mounted() { mounted() {
window.addEventListener("keydown", this.handleKeyDown); window.addEventListener("keydown", this.handleKeyDown);
this.sortColumn = localStorage.getItem("sortColumn") || "score";
this.ascending =
localStorage.getItem("ascending") === "false" ? false : true;
this.isLoading = true;
this.fetchDeals(); this.fetchDeals();
}, },
beforeUnmount() { beforeUnmount() {
@@ -47,12 +42,10 @@ export default {
); );
}, },
fetchDeals() { fetchDeals() {
this.isLoading = true;
axios axios
.get("api/v1/topics") .get("api/v1/topics")
.then((response) => { .then((response) => {
this.topics = response.data; this.topics = response.data;
this.isLoading = false;
}) })
.catch((err) => { .catch((err) => {
console.log(err.response); console.log(err.response);
@@ -123,7 +116,6 @@ const sortBy = ref([{ key: "score", order: "desc" }]); // Vuetify 3 format
:headers="headers" :headers="headers"
:items="filteredTopics" :items="filteredTopics"
:sort-by="sortColumn" :sort-by="sortColumn"
:sort-desc="!ascending"
v-model:sortBy="sortBy" v-model:sortBy="sortBy"
:items-per-page="25" :items-per-page="25"
> >