From 5e23c98841f675a33928c8fc542da0f94a879550 Mon Sep 17 00:00:00 2001 From: Jeremy Scheff Date: Mon, 1 Jul 2024 16:47:14 -0400 Subject: [PATCH] Placeholder files for Advanced Player Search --- src/ui/util/menuItems.tsx | 8 ++++++++ src/ui/util/routeInfos.ts | 1 + src/ui/views/AdvancedPlayerSearch.tsx | 11 +++++++++++ src/ui/views/index.ts | 2 ++ src/worker/api/processInputs.ts | 5 +++++ src/worker/views/advancedPlayerSearch.ts | 9 +++++++++ src/worker/views/index.ts | 2 ++ 7 files changed, 38 insertions(+) create mode 100644 src/ui/views/AdvancedPlayerSearch.tsx create mode 100644 src/worker/views/advancedPlayerSearch.ts diff --git a/src/ui/util/menuItems.tsx b/src/ui/util/menuItems.tsx index 8237a74b4..3c07d97e7 100644 --- a/src/ui/util/menuItems.tsx +++ b/src/ui/util/menuItems.tsx @@ -361,6 +361,14 @@ const menuItems: (MenuItemLink | MenuItemHeader)[] = [ path: ["upcoming_free_agents"], text: "Upcoming Free Agents", }, + { + type: "link", + active: pageID => pageID === "advancedPlayerSearch", + league: true, + commandPalette: true, + path: ["advanced_player_search"], + text: "Advanced Player Search", + }, { type: "link", active: pageID => pageID === "trade", diff --git a/src/ui/util/routeInfos.ts b/src/ui/util/routeInfos.ts index 031108837..806048bfa 100644 --- a/src/ui/util/routeInfos.ts +++ b/src/ui/util/routeInfos.ts @@ -209,6 +209,7 @@ const routeInfos = { "/l/:lid/auto_relocate": "autoRelocate", "/l/:lid/compare_players": "comparePlayers", "/l/:lid/compare_players/:info": "comparePlayers", + "/l/:lid/advanced_player_search": "advancedPlayerSearch", }; export default routeInfos; diff --git a/src/ui/views/AdvancedPlayerSearch.tsx b/src/ui/views/AdvancedPlayerSearch.tsx new file mode 100644 index 000000000..11fd138a6 --- /dev/null +++ b/src/ui/views/AdvancedPlayerSearch.tsx @@ -0,0 +1,11 @@ +import useTitleBar from "../hooks/useTitleBar"; + +const AdvancedPlayerSearch = () => { + useTitleBar({ + title: "Advanced Player Search", + }); + + return "Hi"; +}; + +export default AdvancedPlayerSearch; diff --git a/src/ui/views/index.ts b/src/ui/views/index.ts index 5a1a7bfa8..2279c001d 100644 --- a/src/ui/views/index.ts +++ b/src/ui/views/index.ts @@ -1,6 +1,7 @@ import Account from "./Account"; import AccountUpdateCard from "./AccountUpdateCard"; import Achievements from "./Achievements"; +import AdvancedPlayerSearch from "./AdvancedPlayerSearch"; import AllStar from "./AllStar"; import AllStarDunk from "./AllStarDunk"; import AllStarHistory from "./AllStarHistory"; @@ -114,6 +115,7 @@ export default { Account, AccountUpdateCard, Achievements, + AdvancedPlayerSearch, AllStar, AllStarDunk, AllStarHistory, diff --git a/src/worker/api/processInputs.ts b/src/worker/api/processInputs.ts index 1d45fc65e..fb6008ae7 100644 --- a/src/worker/api/processInputs.ts +++ b/src/worker/api/processInputs.ts @@ -1014,8 +1014,13 @@ const comparePlayers = (params: Params) => { }; }; +const advancedPlayerSearch = () => { + return {}; +}; + export default { account, + advancedPlayerSearch, allStarDunk: validateSeasonOnly, allStarTeams: validateSeasonOnly, allStarThree: validateSeasonOnly, diff --git a/src/worker/views/advancedPlayerSearch.ts b/src/worker/views/advancedPlayerSearch.ts new file mode 100644 index 000000000..2204e3c5b --- /dev/null +++ b/src/worker/views/advancedPlayerSearch.ts @@ -0,0 +1,9 @@ +import type { ViewInput } from "../../common/types"; + +const updateAdvancedPlayerSearch = async ( + inputs: ViewInput<"advancedPlayerSearch">, +) => { + return {}; +}; + +export default updateAdvancedPlayerSearch; diff --git a/src/worker/views/index.ts b/src/worker/views/index.ts index 868d75614..5767ae2f6 100644 --- a/src/worker/views/index.ts +++ b/src/worker/views/index.ts @@ -1,6 +1,7 @@ import account from "./account"; import accountUpdateCard from "./accountUpdateCard"; import achievements from "./achievements"; +import advancedPlayerSearch from "./advancedPlayerSearch"; import allStar from "./allStar"; import allStarDunk from "./allStarDunk"; import allStarHistory from "./allStarHistory"; @@ -108,6 +109,7 @@ export default { account, accountUpdateCard, achievements, + advancedPlayerSearch, allStar, allStarDunk, allStarHistory,