forked from XiaoMo/ChatGPT-Next-Web
Update home.tsx
This commit is contained in:
parent
2a79d35667
commit
9ba59351c5
@ -108,7 +108,7 @@ export function ChatList() {
|
||||
state.currentSessionIndex,
|
||||
state.selectSession,
|
||||
state.removeSession,
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
return (
|
||||
@ -203,7 +203,7 @@ export function Chat(props: {
|
||||
setPromptHints(promptStore.search(text));
|
||||
},
|
||||
100,
|
||||
{ leading: true, trailing: true },
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
const onPromptSelect = (prompt: Prompt) => {
|
||||
@ -217,7 +217,7 @@ export function Chat(props: {
|
||||
if (!dom) return;
|
||||
const paddingBottomNum: number = parseInt(
|
||||
window.getComputedStyle(dom).paddingBottom,
|
||||
10,
|
||||
10
|
||||
);
|
||||
dom.scrollTop = dom.scrollHeight - dom.offsetHeight + paddingBottomNum;
|
||||
};
|
||||
@ -311,7 +311,7 @@ export function Chat(props: {
|
||||
preview: true,
|
||||
},
|
||||
]
|
||||
: [],
|
||||
: []
|
||||
)
|
||||
.concat(
|
||||
userInput.length > 0
|
||||
@ -323,7 +323,7 @@ export function Chat(props: {
|
||||
preview: true,
|
||||
},
|
||||
]
|
||||
: [],
|
||||
: []
|
||||
);
|
||||
|
||||
// auto scroll
|
||||
@ -361,7 +361,7 @@ export function Chat(props: {
|
||||
const newTopic = prompt(Locale.Chat.Rename, session.topic);
|
||||
if (newTopic && newTopic !== session.topic) {
|
||||
chatStore.updateCurrentSession(
|
||||
(session) => (session.topic = newTopic!),
|
||||
(session) => (session.topic = newTopic!)
|
||||
);
|
||||
}
|
||||
}}
|
||||
@ -610,7 +610,7 @@ export function Home() {
|
||||
state.newSession,
|
||||
state.currentSessionIndex,
|
||||
state.removeSession,
|
||||
],
|
||||
]
|
||||
);
|
||||
const loading = !useHasHydrated();
|
||||
const [showSideBar, setShowSideBar] = useState(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user