diff --git a/src/app/(main)/websites/[websiteId]/WebsiteDetails.tsx b/src/app/(main)/websites/[websiteId]/WebsiteDetails.tsx
index a492c203f..d413439fb 100644
--- a/src/app/(main)/websites/[websiteId]/WebsiteDetails.tsx
+++ b/src/app/(main)/websites/[websiteId]/WebsiteDetails.tsx
@@ -1,6 +1,7 @@
'use client';
import { Loading } from 'react-basics';
import { usePathname } from 'next/navigation';
+import { useEffect } from 'react';
import Page from 'components/layout/Page';
import FilterTags from 'components/metrics/FilterTags';
import { useNavigation, useWebsite } from 'components/hooks';
@@ -12,18 +13,34 @@ import WebsiteTableView from './WebsiteTableView';
export default function WebsiteDetails({ websiteId }: { websiteId: string }) {
const { data: website, isLoading, error } = useWebsite(websiteId);
+ const pathname = usePathname();
const { query } = useNavigation();
if (isLoading || error) {
return ;
}
- const showLinks = false
+ const showLinks = !pathname.includes('/share/');
const { view, ...params } = query;
+ useEffect(() => {
+ // Send message to parent window with content height
+ const sendHeight = () => {
+ const height = document.body.scrollHeight;
+ window.parent.postMessage({ height: height }, "*");
+ };
+ // Send content height initially and on resize
+ sendHeight();
+ window.addEventListener('resize', sendHeight);
+
+ // Cleanup event listener on component unmount
+ return () => {
+ window.removeEventListener('resize', sendHeight);
+ };
+ }, []);
return (
<>
-
+ {showLinks && }
diff --git a/src/app/(main)/websites/[websiteId]/WebsiteHeader.tsx b/src/app/(main)/websites/[websiteId]/WebsiteHeader.tsx
index 3d0292506..b339d6b30 100644
--- a/src/app/(main)/websites/[websiteId]/WebsiteHeader.tsx
+++ b/src/app/(main)/websites/[websiteId]/WebsiteHeader.tsx
@@ -48,11 +48,12 @@ export function WebsiteHeader({
return (
)}
{showLinks && (
diff --git a/src/app/share/[...shareId]/Header.module.css b/src/app/share/[...shareId]/Header.module.css
index d353d79a1..1963eec0a 100644
--- a/src/app/share/[...shareId]/Header.module.css
+++ b/src/app/share/[...shareId]/Header.module.css
@@ -2,7 +2,7 @@
display: flex;
flex-direction: row;
align-items: center;
- justify-content: space-between;
+ justify-content: end;
width: 100%;
height: 100px;
}