Files
gameyfin/src/main/frontend/views/ProfileView.tsx
T
Simon Grimme 1273714b8d Add "My Profile" Page
Make integer parsing in ConfigService more robust
Add validation to config pages
Implement Cron expression validator
2024-09-11 18:06:21 +02:00

45 lines
1.3 KiB
TypeScript

import {Listbox, ListboxItem} from "@nextui-org/react";
import {GearFine, Palette, User} from "@phosphor-icons/react";
import {Outlet, useNavigate} from "react-router-dom";
export default function ProfileView() {
const navigate = useNavigate();
const menuItems = [
{
title: "My Profile",
key: "profile",
icon: <User/>,
action: () => navigate('profile')
},
{
title: "Appearance",
key: "appearance",
icon: <Palette/>,
action: () => navigate('appearance')
},
{
title: "Manage account",
icon: <GearFine/>,
key: "account-management",
action: () => navigate('account-management')
}
]
return (
<div className="flex flex-row">
<div className="flex flex-col pr-8">
<Listbox className="min-w-60">
{menuItems.map((i) => (
<ListboxItem key={i.key} onPress={i.action} startContent={i.icon}>
{i.title}
</ListboxItem>
))}
</Listbox>
</div>
<div className="flex flex-col flex-grow">
<Outlet/>
</div>
</div>
);
}