diff --git a/packages/client/src/components/Info/InfoHeader.tsx b/packages/client/src/components/Info/InfoHeader.tsx
deleted file mode 100644
index 90101b5..0000000
--- 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 24a18c2..6abb8b3 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 889ed5d..01c02ec 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 fa90cb8..8653355 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 cc00779..7334faa 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 3bd7ae1..e7027e9 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 0000000..b29d87f
--- /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}
+
+
+ );
+};