diff --git a/packages/client/src/components/Info/InfoHeader.tsx b/packages/client/src/components/Info/InfoHeader.tsx
deleted file mode 100644
index 90101b50f86dd958e7bab45f2f0bbcc6ea0817a6..0000000000000000000000000000000000000000
--- a/packages/client/src/components/Info/InfoHeader.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import { Button } from "@nextui-org/react";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { faXmark } from "@fortawesome/free-solid-svg-icons";
-import { faInfoCircle } from "@fortawesome/free-solid-svg-icons";
-
-export type InfoHeaderProps = {
- setInfoSidebar: (value: boolean) => void
-}
-
-export const InfoHeader = ({ setInfoSidebar }: InfoHeaderProps) => {
- return (
-
-
-
-
-
-
Info
-
Information about the event
-
-
-
-
-
-
-
- );
-};
diff --git a/packages/client/src/components/Info/InfoSidebar.tsx b/packages/client/src/components/Info/InfoSidebar.tsx
index 24a18c2210f638e1045a6121da865bdc6a0a88cb..6abb8b39b1a275ff0c9f74b254c6e4982ec91755 100644
--- a/packages/client/src/components/Info/InfoSidebar.tsx
+++ b/packages/client/src/components/Info/InfoSidebar.tsx
@@ -1,9 +1,8 @@
-import { Divider } from "@nextui-org/react";
import { useAppContext } from "../../contexts/AppContext";
-import { InfoHeader } from "./InfoHeader";
import { InfoText } from "./InfoText";
import { InfoButtons } from "./InfoButtons";
-import { motion } from "framer-motion"
+import { SidebarBase } from "../SidebarBase";
+import { faInfoCircle } from "@fortawesome/free-solid-svg-icons";
/**
* Information sidebar
@@ -16,39 +15,18 @@ export const InfoSidebar = () => {
const { infoSidebar, setInfoSidebar } = useAppContext();
return (
-
+
+
+ )
+};
\ No newline at end of file
diff --git a/packages/client/src/components/Overlay/OverlaySettings.tsx b/packages/client/src/components/Overlay/OverlaySettings.tsx
index 889ed5db67685afeac9e9a57033251d4c540b09e..01c02ec7bd18f61619176234733a7484a2afc942 100644
--- a/packages/client/src/components/Overlay/OverlaySettings.tsx
+++ b/packages/client/src/components/Overlay/OverlaySettings.tsx
@@ -6,11 +6,12 @@ export const OverlaySettings = () => {
useAppContext();
return (
- <>
-
- Overlays
+
+
-
+
@@ -56,6 +57,6 @@ export const OverlaySettings = () => {
/>
)}
- >
+
);
};
diff --git a/packages/client/src/components/Settings/ChatSettings.tsx b/packages/client/src/components/Settings/ChatSettings.tsx
index fa90cb8fbdc538e2494c395ae307cfc21c44a054..865335573b138cda000681977b632a3cda07026a 100644
--- a/packages/client/src/components/Settings/ChatSettings.tsx
+++ b/packages/client/src/components/Settings/ChatSettings.tsx
@@ -8,18 +8,25 @@ export const ChatSettings = () => {
const { loadChat, setLoadChat } = useAppContext();
return (
- <>
-
-
- Chat
+
+
- {loadChat && }
+ {loadChat &&
+
+
+
+ }
- >
+
);
};
diff --git a/packages/client/src/components/Settings/SettingsSidebar.tsx b/packages/client/src/components/Settings/SettingsSidebar.tsx
index cc0077983f56f8a9dd6b7a021655831c2ec722de..7334faa70bd32453c9e64d33e1625d0a4f2354f9 100644
--- a/packages/client/src/components/Settings/SettingsSidebar.tsx
+++ b/packages/client/src/components/Settings/SettingsSidebar.tsx
@@ -1,41 +1,34 @@
-import { Button } from "@nextui-org/react";
+import { faGear } from "@fortawesome/free-solid-svg-icons";
import { useAppContext } from "../../contexts/AppContext";
+import { SidebarBase } from "../SidebarBase";
+import { Button, Divider } from "@nextui-org/react";
import { TemplateSettings } from "./TemplateSettings";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { faXmark } from "@fortawesome/free-solid-svg-icons/faXmark";
import { ChatSettings } from "./ChatSettings";
import { OverlaySettings } from "../Overlay/OverlaySettings";
export const SettingsSidebar = () => {
- const { settingsSidebar, setSettingsSidebar, setShowKeybinds } =
- useAppContext();
+ const { settingsSidebar, setSettingsSidebar, setShowKeybinds } = useAppContext();
return (
-
-
- Settings
-
-
-
-
- abc
-
-
-
-
-
-
- );
-};
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+};
\ No newline at end of file
diff --git a/packages/client/src/components/Settings/TemplateSettings.tsx b/packages/client/src/components/Settings/TemplateSettings.tsx
index 3bd7ae15d2b1248f9b636f81e435fdf77f40149a..e7027e9779c22e12fdc7bdd5b29ca24eb483a9da 100644
--- a/packages/client/src/components/Settings/TemplateSettings.tsx
+++ b/packages/client/src/components/Settings/TemplateSettings.tsx
@@ -22,16 +22,19 @@ export const TemplateSettings = () => {
} = useTemplateContext();
return (
- <>
-
-
- Template
+
);
};
diff --git a/packages/client/src/components/SidebarBase.tsx b/packages/client/src/components/SidebarBase.tsx
new file mode 100644
index 0000000000000000000000000000000000000000..b29d87fd17ddd0998d86cad3393464d94a21b1c8
--- /dev/null
+++ b/packages/client/src/components/SidebarBase.tsx
@@ -0,0 +1,56 @@
+import { motion } from "framer-motion"
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { IconProp } from "@fortawesome/fontawesome-svg-core";
+import { Button, Divider } from "@nextui-org/react";
+import { faXmark } from "@fortawesome/free-solid-svg-icons";
+
+/**
+ * Information sidebar
+ *
+ * TODO: add customization for this post-event (#46)
+ *
+ * @returns
+ */
+export const SidebarBase = ({children, shown, icon, setSidebarShown, title, description, side}: { children: string | JSX.Element | JSX.Element[], icon: IconProp, shown: boolean, setSidebarShown: (value: boolean) => void, title: string, description: string, side: "Left" | "Right" }) => {
+ return (
+
+
+
+
+
+
+
+
+
+
{title}
+
{description}
+
+
+
+
+
+
+
+
+ {children}
+
+
+ );
+};