Skip to content

Commit

Permalink
Update FeedFormPresentation.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
borimong authored Nov 3, 2024
1 parent 4fbefbc commit d02b113
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/components/feed/Modal/FeedFormPresentation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,7 @@ function FeedFormPresentation({
const textAreaRef = useRef(null);
const [remainingHeight, setRemainingHeight] = useState(100);
const [selectedMeeting, setSelectedMeeting] = useState<GroupInfo | undefined>(undefined);
const [isMobileDevice, setIsMobileDevice] = useState(false);
const userAgent = navigator.userAgent;

if (/android/i.test(userAgent) || /iPad|iPhone|iPod/.test(userAgent)) {
setIsMobileDevice(true);
}


const handleWindowResize = () => {
setTextareaHeightChangeFlag(flag => !flag);
};
Expand All @@ -91,7 +85,7 @@ function FeedFormPresentation({
);

const availableHeight = window.innerHeight - allComponentHeights - BasicPadding;
setRemainingHeight(isMobileDevice ? availableHeight - 44 : availableHeight);
setRemainingHeight(availableHeight);
}
}, [textareaHeightChangeFlag]);

Expand Down

0 comments on commit d02b113

Please sign in to comment.