feat: port scenario 903 select-pool flow

This commit is contained in:
2026-07-30 23:27:59 +00:00
parent 9bd057456b
commit 115218ded8
80 changed files with 6859 additions and 48 deletions
+2 -1
View File
@@ -6,7 +6,7 @@ export type GameRouter = typeof appRouter;
const resolveProfileUrl = (template: string, profile: string): string =>
template.replaceAll('{profile}', encodeURIComponent(profile));
export const createGameTrpc = (profile: string, port: number) => {
export const createGameTrpc = (profile: string, port: number, gameToken?: string) => {
const urlTemplate = import.meta.env.VITE_GAME_API_URL_TEMPLATE;
const url = urlTemplate
? resolveProfileUrl(urlTemplate, profile)
@@ -15,6 +15,7 @@ export const createGameTrpc = (profile: string, port: number) => {
links: [
httpBatchLink({
url,
headers: gameToken ? { authorization: `Bearer ${gameToken}` } : undefined,
}),
],
});