mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 00:27:11 +01:00
Allow admins to view account websites.
This commit is contained in:
parent
cb14b8bbda
commit
5a22be5efa
19 changed files with 57 additions and 35 deletions
22
pages/dashboard/[[...id]].js
Normal file
22
pages/dashboard/[[...id]].js
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import React from 'react';
|
||||
import { useRouter } from 'next/router';
|
||||
import Layout from 'components/layout/Layout';
|
||||
import WebsiteList from 'components/WebsiteList';
|
||||
import useRequireLogin from 'hooks/useRequireLogin';
|
||||
|
||||
export default function DashboardPage() {
|
||||
const { loading } = useRequireLogin();
|
||||
const router = useRouter();
|
||||
const { id } = router.query;
|
||||
const userId = id?.[0];
|
||||
|
||||
if (loading) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
<WebsiteList userId={userId} />
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue