From 9f43cae663be6de925bb69e104be4eafc863bdb1 Mon Sep 17 00:00:00 2001 From: Studio-18 Date: Fri, 21 Nov 2025 10:17:47 -0800 Subject: [PATCH 1/2] Adjust my matches filter handling --- src/pages/BrowseMatchesPage.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pages/BrowseMatchesPage.tsx b/src/pages/BrowseMatchesPage.tsx index 9713b895..21886438 100644 --- a/src/pages/BrowseMatchesPage.tsx +++ b/src/pages/BrowseMatchesPage.tsx @@ -364,18 +364,18 @@ const BrowseMatchesPage = () => { const isHostingTab = selectedTab === "Hosting"; const includeHiddenParams = { includeHidden: true as const, include_hidden: true as const }; const tabFilters = (() => { - if (selectedTab === "My Matches") return { filter: "my" as const, status: "upcoming" as const }; - if (isHostingTab) return { filter: "my" as const, status: "upcoming" as const, ...includeHiddenParams }; - if (selectedTab === "Open") return { status: "upcoming" as const, ...includeHiddenParams }; + if (selectedTab === "My Matches") return { filter: "my" as const, ...includeHiddenParams }; + if (isHostingTab) return { filter: "my" as const, ...includeHiddenParams }; + if (selectedTab === "Open") return { ...includeHiddenParams }; if (selectedTab === "Drafts") return { filter: "my" as const, status: "draft" as const, ...includeHiddenParams }; - if (selectedTab === "Archived") return { filter: "my" as const, status: "archived" as const, ...includeHiddenParams }; - if (selectedTab === "Today" || selectedTab === "Tomorrow" || selectedTab === "Weekend") - return { status: "upcoming" as const }; - return { status: "upcoming" as const }; + if (selectedTab === "Archived") return { filter: "archieve" as const, ...includeHiddenParams }; + if (selectedTab === "Today" || selectedTab === "Tomorrow" || selectedTab === "Weekend") return {}; + return {}; })(); const perPage = isHostingTab ? 50 : 20; const hasLocationSelection = Boolean(locationFilter || position); - const locationParams = hasLocationSelection + const isMyMatchesFilter = tabFilters.filter === "my" || tabFilters.filter === "archieve"; + const locationParams = hasLocationSelection && !isMyMatchesFilter ? { latitude: position?.latitude, longitude: position?.longitude, From ecba83bc07f1755d0ffd4cb81697e7031d4baf82 Mon Sep 17 00:00:00 2001 From: Studio-18 Date: Fri, 21 Nov 2025 10:22:23 -0800 Subject: [PATCH 2/2] Adjust my matches filtering --- src/pages/BrowseMatchesPage.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pages/BrowseMatchesPage.tsx b/src/pages/BrowseMatchesPage.tsx index 21886438..4804f2b8 100644 --- a/src/pages/BrowseMatchesPage.tsx +++ b/src/pages/BrowseMatchesPage.tsx @@ -360,21 +360,21 @@ const BrowseMatchesPage = () => { setMatchesError(null); const distanceMiles = parseDistanceMiles(selectedDistance); - const searchQuery = (appliedSearch || locationQuery).trim(); const isHostingTab = selectedTab === "Hosting"; - const includeHiddenParams = { includeHidden: true as const, include_hidden: true as const }; + const personalFilters = { includeHidden: true as const, include_hidden: true as const }; const tabFilters = (() => { - if (selectedTab === "My Matches") return { filter: "my" as const, ...includeHiddenParams }; - if (isHostingTab) return { filter: "my" as const, ...includeHiddenParams }; - if (selectedTab === "Open") return { ...includeHiddenParams }; - if (selectedTab === "Drafts") return { filter: "my" as const, status: "draft" as const, ...includeHiddenParams }; - if (selectedTab === "Archived") return { filter: "archieve" as const, ...includeHiddenParams }; + if (selectedTab === "My Matches") return { filter: "my" as const, ...personalFilters }; + if (isHostingTab) return { filter: "my" as const, ...personalFilters }; + if (selectedTab === "Open") return {}; + if (selectedTab === "Drafts") return { filter: "my" as const, status: "draft" as const, ...personalFilters }; + if (selectedTab === "Archived") return { filter: "archieve" as const, ...personalFilters }; if (selectedTab === "Today" || selectedTab === "Tomorrow" || selectedTab === "Weekend") return {}; return {}; })(); + const isMyMatchesFilter = tabFilters.filter === "my" || tabFilters.filter === "archieve"; + const searchQuery = (isMyMatchesFilter ? appliedSearch : appliedSearch || locationQuery).trim(); const perPage = isHostingTab ? 50 : 20; const hasLocationSelection = Boolean(locationFilter || position); - const isMyMatchesFilter = tabFilters.filter === "my" || tabFilters.filter === "archieve"; const locationParams = hasLocationSelection && !isMyMatchesFilter ? { latitude: position?.latitude,