mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 07:37:11 +01:00
Responsive tables.
This commit is contained in:
parent
cb9dcc7300
commit
9f6e17b986
14 changed files with 26 additions and 31 deletions
|
|
@ -1,28 +0,0 @@
|
|||
import React, { useState } from 'react';
|
||||
import Page from 'components/layout/Page';
|
||||
import MenuLayout from 'components/layout/MenuLayout';
|
||||
import WebsiteSettings from './WebsiteSettings';
|
||||
import AccountSettings from './AccountSettings';
|
||||
import ProfileSettings from './ProfileSettings';
|
||||
import { useSelector } from 'react-redux';
|
||||
|
||||
export default function Settings() {
|
||||
const user = useSelector(state => state.user);
|
||||
const [option, setOption] = useState(1);
|
||||
|
||||
const menuOptions = [
|
||||
{ label: 'Websites', value: 1 },
|
||||
{ label: 'Accounts', value: 2, hidden: !user.is_admin },
|
||||
{ label: 'Profile', value: 3 },
|
||||
];
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<MenuLayout menu={menuOptions} selectedOption={option} onMenuSelect={setOption}>
|
||||
{option === 1 && <WebsiteSettings />}
|
||||
{option === 2 && <AccountSettings />}
|
||||
{option === 3 && <ProfileSettings />}
|
||||
</MenuLayout>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue