Skip to content

Commit

Permalink
change logic of generateSplitViewMaxSizeGetter util
Browse files Browse the repository at this point in the history
  • Loading branch information
andreymikhadyuk committed Sep 13, 2023
1 parent 6c750c6 commit cbf7825
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/commonFeed/utils/generateSplitViewMaxSizeGetter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { MIN_CHAT_WIDTH } from "../constants";

const LEFT_PANE_MIN_WIDTH = 360;

export const generateSplitViewMaxSizeGetter =
(containerWidth: number): (() => number) =>
() =>
containerWidth < 1100 ? MIN_CHAT_WIDTH : Math.floor(containerWidth * 0.6);
Math.max(containerWidth - LEFT_PANE_MIN_WIDTH, MIN_CHAT_WIDTH);

0 comments on commit cbf7825

Please sign in to comment.