mirror of
https://github.com/sqlchat/sqlchat.git
synced 2025-07-25 16:13:10 +08:00
fix: unwanted rerender when connect a new database (#127)
* deleted unused code * fix: error when connect a new database * Update pnpm-lock.yaml * Update pnpm-lock.yaml
This commit is contained in:
@ -105,7 +105,7 @@ const ConnectionSidebar = () => {
|
||||
}, [selectedSchemaName, schemaList]);
|
||||
|
||||
useEffect(() => {
|
||||
if (hasSchemaProperty && selectedSchemaName === "") {
|
||||
if (hasSchemaProperty && selectedSchemaName === "" && schemaList.length > 0) {
|
||||
conversationStore.updateSelectedSchemaName(head(schemaList)?.name || "");
|
||||
}
|
||||
}, [schemaList, currentConversation]);
|
||||
|
@ -42,7 +42,7 @@ const ConversationView = () => {
|
||||
: [];
|
||||
const lastMessage = last(messageList);
|
||||
const [showSchemaDrawer, setShowSchemaDrawer] = useState<boolean>(false);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
messageStore.messageList.map((message: Message) => {
|
||||
if (message.status === "LOADING") {
|
||||
|
Reference in New Issue
Block a user