diff --git a/src/components/ConnectForm.tsx b/src/components/ConnectForm.tsx index 0a6f1b4..32fb9a9 100644 --- a/src/components/ConnectForm.tsx +++ b/src/components/ConnectForm.tsx @@ -23,14 +23,14 @@ const ConnectForm: FC = ({ socket }) => { const isSocketClosed = socket.state === SocketState.Closed; return ( -
-

+
+

Connect to a solstice client -

+

( - + = ({ socket }) => { defaultValue="ws://localhost:2244" required pattern="wss?://.+" - class="border border-gray-400 rounded px-1 mx-1" + className="text-input" /> diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 0cb2fca..1ddd162 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -1,15 +1,30 @@ import { FC } from "react"; import { NavLink } from "react-router-dom"; +interface LinkProps { + to: string; +} + +const Link: FC = ({ to, children }) => ( + + {children} + +); + const Header: FC = () => ( -
-

Solstice web UI

- - Rooms - - - Users - +
+

+ Solstice +

+
); diff --git a/src/components/SearchableList.tsx b/src/components/SearchableList.tsx index b55cb52..11ed8f1 100644 --- a/src/components/SearchableList.tsx +++ b/src/components/SearchableList.tsx @@ -1,4 +1,4 @@ -import { ComponentType, FC, ReactEventHandler } from "react"; +import { ComponentType, FC } from "react"; interface ItemProps { name: string; @@ -8,14 +8,13 @@ interface ItemProps { interface ListProps { id: string; map: { [key: string]: Item }; - refresh: () => void; } // TODO: Add search box. function SearchableList( ItemComponent: ComponentType> ): FC> { - return ({ id, map, refresh }: ListProps) => { + return ({ id, map }: ListProps) => { const children = []; for (const name in map) { @@ -26,19 +25,9 @@ function SearchableList( ); } - const onClick: ReactEventHandler = (event) => { - event.preventDefault(); - refresh(); - }; - return ( -
-
-
- -
-
-
    {children}
+
+
    {children}
); }; diff --git a/src/components/SolsticeApp.tsx b/src/components/SolsticeApp.tsx index 6a4b189..096ea45 100644 --- a/src/components/SolsticeApp.tsx +++ b/src/components/SolsticeApp.tsx @@ -19,7 +19,7 @@ const MainPane: FC = () => { const { path } = useRouteMatch(); return ( -
+
@@ -47,7 +47,7 @@ const ConnectedApp: FC = ({ children }) => { ); } - return
{children}
; + return
{children}
; }; const SolsticeApp = () => ( diff --git a/src/containers/ConnectPage.tsx b/src/containers/ConnectPage.tsx index 31d1fdb..40fa2b4 100644 --- a/src/containers/ConnectPage.tsx +++ b/src/containers/ConnectPage.tsx @@ -25,7 +25,7 @@ const ConnectPage: React.FC = () => { } return ( -
+
); diff --git a/src/containers/Footer.tsx b/src/containers/Footer.tsx index 964ceff..9fd0f17 100644 --- a/src/containers/Footer.tsx +++ b/src/containers/Footer.tsx @@ -11,7 +11,7 @@ const Footer: FC = () => { const socket = useSelector(selectSocket); return ( -