mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-16 02:05:04 +01:00
22 lines
547 B
JavaScript
22 lines
547 B
JavaScript
import { useRouter } from 'next/router';
|
|
import ShareLayout from 'components/layout/ShareLayout';
|
|
import WebsiteDetails from 'components/pages/websites/WebsiteDetails';
|
|
import useShareToken from 'hooks/useShareToken';
|
|
|
|
export default function SharePage() {
|
|
const router = useRouter();
|
|
const { id } = router.query;
|
|
const shareId = id?.[0];
|
|
const shareToken = useShareToken(shareId);
|
|
|
|
if (!shareToken) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<ShareLayout>
|
|
<WebsiteDetails websiteId={shareToken.websiteId} />
|
|
</ShareLayout>
|
|
);
|
|
}
|