mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 08:37:13 +01:00
Refactored teams components.
This commit is contained in:
parent
6253d55790
commit
8b48130d5f
18 changed files with 75 additions and 44 deletions
|
|
@ -9,7 +9,7 @@ export default function SettingsLayout({ children }) {
|
|||
const { user } = useUser();
|
||||
const pathname = usePathname();
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const cloudMode = Boolean(process.env.cloudMode);
|
||||
const cloudMode = !!process.env.cloudMode;
|
||||
|
||||
const items = [
|
||||
{ key: 'websites', label: formatMessage(labels.websites), url: '/settings/websites' },
|
||||
|
|
@ -20,6 +20,10 @@ export default function SettingsLayout({ children }) {
|
|||
|
||||
const getKey = () => items.find(({ url }) => pathname === url)?.key;
|
||||
|
||||
if (cloudMode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.layout}>
|
||||
{!cloudMode && (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue