umami/pages/dashboard/[[...id]].js

27 lines
558 B
JavaScript
Raw Normal View History

2020-08-06 06:03:07 +00:00
import React from 'react';
2020-08-07 09:27:12 +00:00
import Layout from 'components/layout/Layout';
2022-03-04 03:45:49 +00:00
import Dashboard from 'components/pages/Dashboard';
2020-08-06 06:03:07 +00:00
import useRequireLogin from 'hooks/useRequireLogin';
2022-10-12 22:35:33 +00:00
export default function DashboardPage({ settingsDisabled }) {
2020-08-06 06:03:07 +00:00
const { loading } = useRequireLogin();
if (loading) {
return null;
}
return (
2022-10-12 22:35:33 +00:00
<Layout settingsDisabled={settingsDisabled}>
2022-03-04 03:45:49 +00:00
<Dashboard />
2020-08-06 06:03:07 +00:00
</Layout>
);
}
2022-10-12 22:35:33 +00:00
export async function getServerSideProps() {
return {
props: {
settingsDisabled: !!process.env.CLOUD_MODE,
},
};
}