From da518bbd1e68faa65a961a7f658b0838d519b41f Mon Sep 17 00:00:00 2001 From: Janis Date: Mon, 24 Jul 2023 00:47:55 +0200 Subject: [PATCH] add searchparams port --- src/App.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 0a7f10e..5a4d5a9 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,16 +1,14 @@ /* eslint-disable react-hooks/exhaustive-deps */ import "@styles/App.scss"; -import { IChannel, IClient, IConnection, ITS5ConnectionHandler } from "@interfaces/teamspeak"; -import { useEffect, useState } from "react"; +import { IClient } from "@interfaces/teamspeak"; import Viewer from "./Viewer"; import { useSearchParams } from "react-router-dom"; -import { TS5ConnectionHandler } from "@handlers/teamspeak/connectionHandler"; import useTSRemoteApp from "./hooks/useTSRemoteApp"; export default function App() { const [searchParams] = useSearchParams(); - const { clients, channels, connections, activeConnectionId, currentChannel } = useTSRemoteApp({ - remoteAppPort: 5899, + const { clients, activeConnectionId, currentChannel } = useTSRemoteApp({ + remoteAppPort: parseInt(searchParams.get("remoteAppPort") ?? "5899"), }); return (