summaryrefslogtreecommitdiffstats
path: root/src/components/App
diff options
context:
space:
mode:
authorGravatar Tom van der Lee <tom@vanderlee.io>2026-06-30 22:23:27 +0200
committerGravatar Tom van der Lee <tom@vanderlee.io>2026-06-30 22:23:28 +0200
commit95600cf6da1c6fbd5ee9f1a5de57b17503d4fe9c (patch)
treec8c82dc9c59ad04c0b0b66510a6374e207bb85ed /src/components/App
parent5f32db609e618bebd568d48d151a80d865e55859 (diff)
downloadclient-95600cf6da1c6fbd5ee9f1a5de57b17503d4fe9c.tar.gz
client-95600cf6da1c6fbd5ee9f1a5de57b17503d4fe9c.tar.bz2
client-95600cf6da1c6fbd5ee9f1a5de57b17503d4fe9c.zip
Filter based on subdomainsv2.4.1main
Diffstat (limited to 'src/components/App')
-rw-r--r--src/components/App/App.tsx15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/components/App/App.tsx b/src/components/App/App.tsx
index 85119e6..2c8025d 100644
--- a/src/components/App/App.tsx
+++ b/src/components/App/App.tsx
@@ -1,5 +1,5 @@
1import * as React from "react"; 1import * as React from "react";
2import { ReactElement, useContext, useEffect } from "react"; 2import { ReactElement, useContext, useEffect, useState } from "react";
3 3
4import styles from "~/components/App/App.module.scss"; 4import styles from "~/components/App/App.module.scss";
5import RequestDetails from "~/components/RequestDetails/RequestDetails"; 5import RequestDetails from "~/components/RequestDetails/RequestDetails";
@@ -28,9 +28,9 @@ type ReadyStateMap = {
28}; 28};
29 29
30const statusIconMap: ReadyStateMap = { 30const statusIconMap: ReadyStateMap = {
31 [ReadyState.CONNECTING]: "🔴", 31 [ReadyState.CONNECTING]: "🟠",
32 [ReadyState.OPEN]: "🟢", 32 [ReadyState.OPEN]: "🟢",
33 [ReadyState.CLOSING]: "🔴", 33 [ReadyState.CLOSING]: "🟠",
34 [ReadyState.CLOSED]: "🔴", 34 [ReadyState.CLOSED]: "🔴",
35}; 35};
36 36
@@ -47,9 +47,9 @@ export default function App() {
47 useContext(ConnectionContext); 47 useContext(ConnectionContext);
48 48
49 useEffect(() => { 49 useEffect(() => {
50 const url = new URL(config?.url ?? "https://loading..."); 50 const url = new URL(config?.urls[0] ?? "https://loading...");
51 document.title = `${statusIconMap[readyState]} ${url.host} | TTUN`; 51 document.title = `${statusIconMap[readyState]} ${url.host} | TTUN`;
52 }, [readyState, config?.url]); 52 }, [readyState, config?.urls]);
53 53
54 const settingsMenu: (SettingsMenu | null)[] = [ 54 const settingsMenu: (SettingsMenu | null)[] = [
55 { 55 {
@@ -80,11 +80,6 @@ export default function App() {
80 </Navbar.Text> 80 </Navbar.Text>
81 </div> 81 </div>
82 <div className="d-flex"> 82 <div className="d-flex">
83 <Navbar.Text>
84 <a href={config.url} target="_blank">
85 {config.url}
86 </a>
87 </Navbar.Text>
88 <Navbar.Toggle aria-controls="settings" /> 83 <Navbar.Toggle aria-controls="settings" />
89 <Navbar.Collapse id="settings" className="ms-2" role="button"> 84 <Navbar.Collapse id="settings" className="ms-2" role="button">
90 <Nav> 85 <Nav>