diff --git a/frontend/src/components/routes/event/Settings/Sections/EventDetailsForm/index.tsx b/frontend/src/components/routes/event/Settings/Sections/EventDetailsForm/index.tsx index 3819d02368..6902f2a86a 100644 --- a/frontend/src/components/routes/event/Settings/Sections/EventDetailsForm/index.tsx +++ b/frontend/src/components/routes/event/Settings/Sections/EventDetailsForm/index.tsx @@ -62,7 +62,7 @@ export const EventDetailsForm = () => { return (
diff --git a/frontend/src/components/routes/event/Settings/index.tsx b/frontend/src/components/routes/event/Settings/index.tsx index 7aa84e1869..9946992a8a 100644 --- a/frontend/src/components/routes/event/Settings/index.tsx +++ b/frontend/src/components/routes/event/Settings/index.tsx @@ -7,22 +7,109 @@ import {PageTitle} from "../../../common/PageTitle"; import {t} from "@lingui/macro"; import {SeoSettings} from "./Sections/SeoSettings"; import {MiscSettings} from "./Sections/MiscSettings"; +import {Box, Group, NavLink as MantineNavLink, Stack} from "@mantine/core"; +import { + IconAdjustments, + IconAt, + IconBrandGoogleAnalytics, + IconBuildingStore, + IconHome, + IconMapPin, +} from "@tabler/icons-react"; +import {useMediaQuery} from "@mantine/hooks"; +import {useState} from "react"; +import {Card} from "../../../common/Card"; + +const SECTIONS = [ + { + id: 'event-details', + label: t`Event Details`, + icon: IconBuildingStore, + component: EventDetailsForm + }, + { + id: 'location-settings', + label: t`Location`, + icon: IconMapPin, + component: LocationSettings + }, + { + id: 'homepage-settings', + label: t`Checkout`, + icon: IconHome, + component: HomepageAndCheckoutSettings + }, + { + id: 'seo-settings', + label: t`SEO`, + icon: IconBrandGoogleAnalytics, + component: SeoSettings + }, + { + id: 'email-settings', + label: t`Email`, + icon: IconAt, + component: EmailSettings + }, + { + id: 'misc-settings', + label: t`Miscellaneous`, + icon: IconAdjustments, + component: MiscSettings + } +]; export const Settings = () => { + const isLargeScreen = useMediaQuery('(min-width: 1200px)'); + const [activeSection, setActiveSection] = useState(SECTIONS[0].id); + + const handleClick = (sectionId: string) => { + setActiveSection(sectionId); + document.getElementById(sectionId)?.scrollIntoView({behavior: 'smooth'}); + }; + + const sideMenu = ( + + + {SECTIONS.map((section) => ( + } + onClick={() => handleClick(section.id)} + /> + ))} + + + ); + + const content = SECTIONS.map(({id, component: Component}) => ( +
+ +
+ )); + return ( - - - {t`Settings`} - - - - - - - - + + {t`Settings`} + + {isLargeScreen ? ( + + + {sideMenu} + + {content} + + ) : ( + + {sideMenu} + {content} + + )} ); }; -export default Settings; \ No newline at end of file +export default Settings;