From b90eadcb4eb45f09b19108b61ef191220e4439fc Mon Sep 17 00:00:00 2001 From: t1enne <65537403+t1enne@users.noreply.github.com> Date: Thu, 28 Apr 2022 18:54:33 +0200 Subject: [PATCH] restructured components folders and layout (#1886) --- web/components/layouts/main.tsx | 58 +++------------------ web/components/ui/Content/Content.tsx | 26 +++++++++ web/components/ui/Content/index.ts | 1 + web/components/ui/Footer/Footer.module.scss | 0 web/components/ui/Footer/Footer.tsx | 13 +++++ web/components/ui/Footer/index.ts | 1 + web/components/ui/Header/Header.module.scss | 4 ++ web/components/ui/Header/Header.tsx | 31 +++++++++++ web/components/ui/Header/index.ts | 1 + web/components/ui/Sidebar/Sidebar.tsx | 19 +++++++ web/components/ui/Sidebar/index.ts | 1 + web/components/ui/index.tsx | 4 ++ 12 files changed, 109 insertions(+), 50 deletions(-) create mode 100644 web/components/ui/Content/Content.tsx create mode 100644 web/components/ui/Content/index.ts create mode 100644 web/components/ui/Footer/Footer.module.scss create mode 100644 web/components/ui/Footer/Footer.tsx create mode 100644 web/components/ui/Footer/index.ts create mode 100644 web/components/ui/Header/Header.module.scss create mode 100644 web/components/ui/Header/Header.tsx create mode 100644 web/components/ui/Header/index.ts create mode 100644 web/components/ui/Sidebar/Sidebar.tsx create mode 100644 web/components/ui/Sidebar/index.ts create mode 100644 web/components/ui/index.tsx diff --git a/web/components/layouts/main.tsx b/web/components/layouts/main.tsx index 5c0183fc3..4c5d64040 100644 --- a/web/components/layouts/main.tsx +++ b/web/components/layouts/main.tsx @@ -1,61 +1,19 @@ -import { useRecoilValue } from 'recoil'; -import { Layout, Row, Col } from 'antd'; -import { useState } from 'react'; -import { ServerStatus } from '../../interfaces/server-status.model'; -import { ServerStatusStore, serverStatusState } from '../stores/ServerStatusStore'; -import { ClientConfigStore, clientConfigState } from '../stores/ClientConfigStore'; -import { ClientConfig } from '../../interfaces/client-config.model'; - -const { Header, Content, Footer, Sider } = Layout; +import { Layout } from 'antd'; +import { ServerStatusStore } from '../stores/ServerStatusStore'; +import { ClientConfigStore } from '../stores/ClientConfigStore'; +import { Content, Footer, Header, Sidebar } from '../ui'; function Main() { - const serverStatus = useRecoilValue(serverStatusState); - const clientConfig = useRecoilValue(clientConfigState); - - const { name, version, extraPageContent } = clientConfig; - const [chatCollapsed, setChatCollapsed] = useState(false); - - const toggleChatCollapsed = () => { - setChatCollapsed(!chatCollapsed); - }; - return ( <> - - + +
-
- {name} - -
- -
- - Video player goes here - - - - - - -
-
-
Footer: Owncast {version}
+ +