mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-01 00:08:11 +01:00
22 lines
550 B
JavaScript
22 lines
550 B
JavaScript
import { useRouter } from 'next/router';
|
|
import ShareLayout from 'components/layout/ShareLayout';
|
|
import WebsiteDetailsPage from 'components/pages/websites/WebsiteDetailsPage';
|
|
import useShareToken from '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>
|
|
);
|
|
}
|