diff --git a/frontend/pages/profile/notifications.vue b/frontend/pages/profile/notifications.vue
index 2c5d6b4..4e39860 100644
--- a/frontend/pages/profile/notifications.vue
+++ b/frontend/pages/profile/notifications.vue
@@ -14,16 +14,15 @@ definePageMeta({
import { usePushNotifications } from "~/composables/global/usePushNotifications";
import useSubscribeNotification from "~/composables/api/notifications/useSubscribeNotification";
-import useGetAllNotifications, {
- type GetAllNotificationsRequest,
-} from "~/composables/api/account/useGetAllNotifications";
+import useGetAllNotifications from "~/composables/api/account/useGetAllNotifications";
+import { useAppParams } from "~/composables/global/useAppParams";
// state
-const params: GetAllNotificationsRequest = useUrlSearchParams("history");
-
const subscribe = ref(false);
+const { status, sort } = useAppParams();
+
const sortFilters = ref([
{
title: "اخبار",
@@ -59,17 +58,9 @@ const { isPending: subscribeNotificationIsPending } = useSubscribeNotification()
// computeds
-const filters = computed(() => {
- return {
- sort: params.sort ?? "created_at",
- status: params.status ?? "",
- page: params.page ?? 1,
- };
-});
-
const hasNotifications = computed(() => data.value && data.value.count > 0);
-const { data, isLoading: notificationsIsLoading } = useGetAllNotifications(filters);
+const { data, isLoading: notificationsIsLoading } = useGetAllNotifications();
const notifications = computed(() => {
return data.value?.results.flat();
@@ -136,7 +127,7 @@ watch(
فیلتر بر اساس