Skip to content

Commit 79e54b1

Browse files
authored
Fix padding bug + add space for new chats too (#298)
1 parent d39c4bc commit 79e54b1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

gui/src/pages/gui.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ function GUI() {
233233
if (inputContainerRef.current && topGuiDivRef.current) {
234234
const scrollTop = topGuiDivRef.current.scrollTop;
235235
const height = inputContainerRef.current.offsetHeight;
236-
const newPadding = isNewSession ? '0px' : `${height + 20}px`;
236+
const newPadding = `${height + 20}px`;
237237

238238
topGuiDivRef.current.style.paddingBottom = '0px';
239239
topGuiDivRef.current.offsetHeight;
@@ -372,8 +372,9 @@ function GUI() {
372372
[state.history],
373373
);
374374

375-
const adjustPadding = useCallback((height: number) => {
376-
if (topGuiDivRef.current) {
375+
const adjustPadding = useCallback(() => {
376+
if (inputContainerRef.current && topGuiDivRef.current) {
377+
const height = inputContainerRef.current.offsetHeight;
377378
topGuiDivRef.current.style.paddingBottom = `${height + 20}px`;
378379
}
379380
}, []);

0 commit comments

Comments
 (0)