Different method + fixed lint for tracker + added frame mode for shared URLs

This commit is contained in:
Bartosz Hernas 2020-09-15 00:09:09 +02:00
parent 2ea91aaabf
commit d19bcbabe0
3 changed files with 42 additions and 41 deletions

View file

@ -6,7 +6,7 @@ import useFetch from 'hooks/useFetch';
export default function SharePage() {
const router = useRouter();
const { id } = router.query;
const { id, frame } = router.query;
const shareId = id?.[0];
const { data } = useFetch(shareId ? `/api/share/${shareId}` : null);
@ -15,7 +15,7 @@ export default function SharePage() {
}
return (
<Layout>
<Layout header={!frame} footer={!frame}>
<WebsiteDetails websiteId={data.website_id} />
</Layout>
);