Skip to content

Commit 17c9e4a

Browse files
authored
revert: dont use local storage for filters (#4129)
1 parent d7f1029 commit 17c9e4a

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

apps/frontend/src/pages/moderation/index.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ import {
100100
ScaleIcon,
101101
} from "@modrinth/assets";
102102
import { defineMessages, useVIntl } from "@vintl/vintl";
103-
import { useLocalStorage } from "@vueuse/core";
104103
import ConfettiExplosion from "vue-confetti-explosion";
105104
import Fuse from "fuse.js";
106105
import ModerationQueueCard from "~/components/ui/moderation/ModerationQueueCard.vue";
@@ -215,7 +214,7 @@ watch(
215214
},
216215
);
217216
218-
const currentFilterType = useLocalStorage("moderation-current-filter-type", () => "All projects");
217+
const currentFilterType = ref("All projects");
219218
const filterTypes: readonly string[] = readonly([
220219
"All projects",
221220
"Modpacks",
@@ -226,7 +225,7 @@ const filterTypes: readonly string[] = readonly([
226225
"Shaders",
227226
]);
228227
229-
const currentSortType = useLocalStorage("moderation-current-sort-type", () => "Oldest");
228+
const currentSortType = ref("Oldest");
230229
const sortTypes: readonly string[] = readonly(["Oldest", "Newest"]);
231230
232231
const currentPage = ref(1);

apps/frontend/src/pages/moderation/reports/index.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
import { DropdownSelect, Button, Pagination } from "@modrinth/ui";
7373
import { XIcon, SearchIcon, SortAscIcon, SortDescIcon, FilterIcon } from "@modrinth/assets";
7474
import { defineMessages, useVIntl } from "@vintl/vintl";
75-
import { useLocalStorage } from "@vueuse/core";
7675
import type { Report } from "@modrinth/utils";
7776
import Fuse from "fuse.js";
7877
import type { ExtendedReport } from "@modrinth/moderation";
@@ -170,10 +169,10 @@ watch(
170169
},
171170
);
172171
173-
const currentFilterType = useLocalStorage("moderation-reports-filter-type", () => "All");
172+
const currentFilterType = ref("All");
174173
const filterTypes: readonly string[] = readonly(["All", "Unread", "Read"]);
175174
176-
const currentSortType = useLocalStorage("moderation-reports-sort-type", () => "Oldest");
175+
const currentSortType = ref("Oldest");
177176
const sortTypes: readonly string[] = readonly(["Oldest", "Newest"]);
178177
179178
const currentPage = ref(1);

0 commit comments

Comments
 (0)