Skip to content

Commit

Permalink
Add "Manage guests" menu item
Browse files Browse the repository at this point in the history
  • Loading branch information
ulrikandersen committed Feb 20, 2024
1 parent 7c3a98d commit 79f9fdc
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions src/features/user/view/SettingsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ import ThickDivider from "@/common/ui/ThickDivider"
import DocumentationVisualizationPicker from "./DocumentationVisualizationPicker"
import { signOut } from "next-auth/react"

const SettingsItem = ({ onClick, href, children }: {
onClick?: () => void;
href?: string;
children?: string;
}) =>
<Button
variant="text"
fullWidth={true}
style={{ justifyContent: "flex-start" }}
sx={{ marginTop: 1.3 }}
onClick={onClick}
href={href}
>{children}</Button>

const SettingsList = () => {
return (
<List sx={{
Expand All @@ -14,15 +28,14 @@ const SettingsList = () => {
}}>
<DocumentationVisualizationPicker sx={{ marginBottom: 2 }} />
<ThickDivider sx={{ marginLeft: -2, marginRight: -2 }} />
<Button
variant="text"
fullWidth={true}
style={{justifyContent: "flex-start"}}
sx={{ marginTop: 1.3 }}
<SettingsItem href={'/admin/guests'}>
Manage guests
</SettingsItem>
<SettingsItem
onClick={() => signOut()}
>
Log out
</Button>
</SettingsItem>
</List>
)
}
Expand Down

0 comments on commit 79f9fdc

Please sign in to comment.