mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
Moved code into src folder. Added build for component library.
This commit is contained in:
parent
7a7233ead4
commit
ede658771e
490 changed files with 749 additions and 442 deletions
21
src/pages/share/[...id].js
Normal file
21
src/pages/share/[...id].js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { useRouter } from 'next/router';
|
||||
import ShareLayout from 'components/layout/ShareLayout';
|
||||
import WebsiteDetailsPage from 'components/pages/websites/WebsiteDetailsPage';
|
||||
import useShareToken from 'components/hooks/useShareToken';
|
||||
|
||||
export default function () {
|
||||
const router = useRouter();
|
||||
const { id } = router.query;
|
||||
const shareId = id?.[0];
|
||||
const shareToken = useShareToken(shareId);
|
||||
|
||||
if (!shareToken) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<ShareLayout>
|
||||
<WebsiteDetailsPage websiteId={shareToken.websiteId} />
|
||||
</ShareLayout>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue