mirror of
https://github.com/umami-software/umami.git
synced 2026-02-16 02:25:35 +01:00
Added checks for CLOUD_MODE.
This commit is contained in:
parent
5657a64c77
commit
3ac560dc0f
24 changed files with 175 additions and 60 deletions
|
|
@ -2,13 +2,25 @@ import AppLayout from 'components/layout/AppLayout';
|
|||
import TeamSettings from 'components/pages/settings/teams/TeamSettings';
|
||||
import { useRouter } from 'next/router';
|
||||
|
||||
export default function TeamDetailPage() {
|
||||
export default function TeamDetailPage({ disabled }) {
|
||||
const router = useRouter();
|
||||
const { id } = router.query;
|
||||
|
||||
if (!id || disabled) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<AppLayout>
|
||||
<TeamSettings teamId={id} />
|
||||
</AppLayout>
|
||||
);
|
||||
}
|
||||
|
||||
export async function getServerSideProps() {
|
||||
return {
|
||||
props: {
|
||||
disabled: !!process.env.CLOUD_MODE,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,22 @@
|
|||
import AppLayout from 'components/layout/AppLayout';
|
||||
import TeamsList from 'components/pages/settings/teams/TeamsList';
|
||||
|
||||
export default function TeamsPage() {
|
||||
export default function TeamsPage({ disabled }) {
|
||||
if (disabled) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<AppLayout>
|
||||
<TeamsList />
|
||||
</AppLayout>
|
||||
);
|
||||
}
|
||||
|
||||
export async function getServerSideProps() {
|
||||
return {
|
||||
props: {
|
||||
disabled: !!process.env.CLOUD_MODE,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue