umami/pages/settings/websites/[id]/index.js
2023-02-28 20:04:07 -08:00

27 lines
564 B
JavaScript

import { useRouter } from 'next/router';
import WebsiteSettings from 'components/pages/settings/websites/WebsiteSettings';
import AppLayout from 'components/layout/AppLayout';
export default function WebsiteSettingsPage({ disabled }) {
const router = useRouter();
const { id } = router.query;
if (!id || disabled) {
return null;
}
return (
<AppLayout>
<WebsiteSettings websiteId={id} />
</AppLayout>
);
}
export async function getServerSideProps() {
return {
props: {
disabled: !!process.env.CLOUD_MODE,
},
};
}