mirror of
https://github.com/umami-software/umami.git
synced 2026-02-16 18:45:36 +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,11 +2,11 @@ import { useRouter } from 'next/router';
|
|||
import WebsiteSettings from 'components/pages/settings/websites/WebsiteSettings';
|
||||
import AppLayout from 'components/layout/AppLayout';
|
||||
|
||||
export default function WebsiteSettingsPage() {
|
||||
export default function WebsiteSettingsPage({ disabled }) {
|
||||
const router = useRouter();
|
||||
const { id } = router.query;
|
||||
|
||||
if (!id) {
|
||||
if (!id || disabled) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -16,3 +16,11 @@ export default function WebsiteSettingsPage() {
|
|||
</AppLayout>
|
||||
);
|
||||
}
|
||||
|
||||
export async function getServerSideProps() {
|
||||
return {
|
||||
props: {
|
||||
disabled: !!process.env.CLOUD_MODE,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,22 @@
|
|||
import AppLayout from 'components/layout/AppLayout';
|
||||
import WebsitesList from 'components/pages/settings/websites/WebsitesList';
|
||||
|
||||
export default function WebsitesPage() {
|
||||
export default function WebsitesPage({ disabled }) {
|
||||
if (disabled) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<AppLayout>
|
||||
<WebsitesList />
|
||||
</AppLayout>
|
||||
);
|
||||
}
|
||||
|
||||
export async function getServerSideProps() {
|
||||
return {
|
||||
props: {
|
||||
disabled: !!process.env.CLOUD_MODE,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue