mirror of
https://github.com/umami-software/umami.git
synced 2026-02-20 12:35:38 +01:00
Rewrite admin.
This commit is contained in:
parent
f4db04c3c6
commit
6cf6a97b4d
114 changed files with 2174 additions and 1820 deletions
32
components/pages/ProfileDetails.js
Normal file
32
components/pages/ProfileDetails.js
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import Page from 'components/layout/Page';
|
||||
import PageHeader from 'components/layout/PageHeader';
|
||||
import ProfileSettings from 'components/settings/ProfileSettings';
|
||||
import { useState } from 'react';
|
||||
import { Breadcrumbs, Item, Tabs, useToast } from 'react-basics';
|
||||
import ProfilePasswordForm from 'components/forms/ProfilePasswordForm';
|
||||
|
||||
export default function ProfileDetails() {
|
||||
const [tab, setTab] = useState('general');
|
||||
const { toast, showToast } = useToast();
|
||||
|
||||
const handleSave = () => {
|
||||
showToast({ message: 'Saved successfully.', variant: 'success' });
|
||||
};
|
||||
|
||||
return (
|
||||
<Page>
|
||||
{toast}
|
||||
<PageHeader>
|
||||
<Breadcrumbs>
|
||||
<Item>Profile</Item>
|
||||
</Breadcrumbs>
|
||||
</PageHeader>
|
||||
<Tabs selectedKey={tab} onSelect={setTab} style={{ marginBottom: 30, fontSize: 14 }}>
|
||||
<Item key="general">General</Item>
|
||||
<Item key="password">Password</Item>
|
||||
</Tabs>
|
||||
{tab === 'general' && <ProfileSettings />}
|
||||
{tab === 'password' && <ProfilePasswordForm onSave={handleSave} />}
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue