diff --git a/app/components/charts/BubbleChart.tsx b/app/components/charts/BubbleChart.tsx index 9f9a9c9..e093cd9 100644 --- a/app/components/charts/BubbleChart.tsx +++ b/app/components/charts/BubbleChart.tsx @@ -66,7 +66,7 @@ const BubbleChart: FC = ({ .attr("height", height) .attr( "style", - `position: absolute; top: -40; max-width: 100%; height: auto; display: block; margin: 0 -14px; background: transparent; cursor: pointer;` + `position: absolute;${isDesktop ? " top: -40;" : ""} max-width: 100%; height: auto; display: block; margin: 0 -14px; background: transparent; cursor: pointer;` ); const node = svg diff --git a/app/components/tables/AIProductTable.tsx b/app/components/tables/AIProductTable.tsx index f1fbae7..56fcafe 100644 --- a/app/components/tables/AIProductTable.tsx +++ b/app/components/tables/AIProductTable.tsx @@ -158,7 +158,7 @@ const AIProductTable: FC = ({
-
+
diff --git a/app/routes/_index.tsx b/app/routes/_index.tsx index 481cdf0..2a92e32 100644 --- a/app/routes/_index.tsx +++ b/app/routes/_index.tsx @@ -12,6 +12,7 @@ import ViewSwitcher, { ViewType } from "~/components/navigation/ViewSwitcher"; import AIProductTable from "~/components/tables/AIProductTable"; import { ZoomControl } from "~/components/zoom/ZoomControl"; import { ModalContext } from "~/context/ModalContext"; +import { useScreenSize } from "~/context/ScreenSizeContext"; import { NotificationType } from "~/types"; import { zoomFeatureFlag } from "~/utils/featureFlags"; @@ -33,6 +34,7 @@ export default function Index() { const [nodeAncestors, setNodeAncestors] = useState([]); const [zoomPercentage, setZoomPercentage] = useState(100); const [productName, setProductName] = useState(""); + const { isDesktop } = useScreenSize(); const handleIsInfoModalClose = () => { setProductName(""); @@ -114,7 +116,7 @@ export default function Index() { {!jsonData || !jsonModalData ? ( ) : ( -
+
-
+
{/* Use this if you want to display the Sunburst chart instead of the Bubble chart */} {/*
-
-
+
}
)} {currentView === ViewType.BubbleChart && (