Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { useEffect } from "react";
import useDimensions from "react-cool-dimensions";
import { useConfigSelector } from "../../../../store/config/useConfigSelector";
import { Environment } from "../../../common/App/types";
import { EnvironmentIcon } from "../../../common/EnvironmentIcon";
Expand All @@ -14,9 +16,11 @@ export const EnvironmentMenu = ({
const handleMenuItemClick = (environment: Environment) => {
onMenuItemClick(environment);
};
const { observe, height } = useDimensions();
useEffect(() => observe(document.body), []);

return (
<s.EnvironmentMenuPopup height={"140px"}>
<s.EnvironmentMenuPopup height={`${height * 0.55}px`}>
<MenuList
highlightSelected={true}
showGroupNames={true}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navigation/EnvironmentBar/mockData.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Environment } from "../../common/App/types";

export const mockedEnvironments: Environment[] = new Array(5)
export const mockedEnvironments: Environment[] = new Array(35)
.fill(5)
.map((_, i) => {
const id = `ENV${i + 1}`;
Expand Down
Loading