mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-16 02:05:04 +01:00
f3879c92e1
# Conflicts: # lib/middleware.ts # pages/api/users/[id]/index.ts # pages/api/users/index.ts # pages/api/websites/[id]/active.ts # pages/api/websites/[id]/eventdata.ts # pages/api/websites/[id]/events.ts # pages/api/websites/[id]/index.ts # pages/api/websites/[id]/metrics.ts # pages/api/websites/[id]/pageviews.ts # pages/api/websites/[id]/reset.ts # pages/api/websites/[id]/stats.ts # yarn.lock
22 lines
518 B
JavaScript
22 lines
518 B
JavaScript
import { useRouter } from 'next/router';
|
|
import Layout from 'components/layout/Layout';
|
|
import WebsiteDetails from 'components/pages/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 (
|
|
<Layout>
|
|
<WebsiteDetails websiteId={shareToken.websiteId} />
|
|
</Layout>
|
|
);
|
|
}
|