diff --git a/components/EngineIcon.tsx b/components/EngineIcon.tsx
index 87328f1..d397707 100644
--- a/components/EngineIcon.tsx
+++ b/components/EngineIcon.tsx
@@ -10,11 +10,11 @@ const EngineIcon = (props: Props) => {
const { className, engine } = props;
if (engine === Engine.MySQL) {
- return
;
+ return
;
} else if (engine === Engine.PostgreSQL) {
- return
;
+ return
;
} else {
- return
;
+ return
;
}
};
diff --git a/components/Icon.tsx b/components/Icon.tsx
index 70580d8..97e20b5 100644
--- a/components/Icon.tsx
+++ b/components/Icon.tsx
@@ -2,20 +2,16 @@ import * as Ai from "react-icons/ai";
import * as Bi from "react-icons/bi";
import * as Bs from "react-icons/bs";
import * as Di from "react-icons/di";
-import * as Hi from "react-icons/hi";
import * as Io from "react-icons/io";
import * as Io5 from "react-icons/io5";
-import * as Si from "react-icons/si";
const Icon = {
- Ai,
- Bi,
- Bs,
- Di,
- Hi,
- Io,
- Io5,
- Si,
+ ...Ai,
+ ...Bi,
+ ...Bs,
+ ...Di,
+ ...Io,
+ ...Io5,
};
// Icon is a collection of all icons from react-icons.
diff --git a/components/SettingModal.tsx b/components/SettingModal.tsx
index cb0c486..9c73980 100644
--- a/components/SettingModal.tsx
+++ b/components/SettingModal.tsx
@@ -31,7 +31,7 @@ const SettingModal = (props: Props) => {
Setting
Danger Zone
diff --git a/store/chat.ts b/store/chat.ts
index 24fbff0..78b1cef 100644
--- a/store/chat.ts
+++ b/store/chat.ts
@@ -16,14 +16,16 @@ const getDefaultChat = (): Chat => {
interface ChatState {
chatList: Chat[];
currentChat?: Chat;
- createChat: (connectionId?: Id, databaseName?: string) => void;
+ getState: () => ChatState;
+ createChat: (connectionId?: Id, databaseName?: string) => Chat;
setCurrentChat: (chat: Chat | undefined) => void;
}
export const useChatStore = create()(
persist(
- (set) => ({
+ (set, get) => ({
chatList: [],
+ getState: () => get(),
createChat: (connectionId?: Id, databaseName?: string) => {
const chat: Chat = {
...getDefaultChat(),
@@ -34,6 +36,7 @@ export const useChatStore = create()(
chatList: [...state.chatList, chat],
currentChat: chat,
}));
+ return chat;
},
setCurrentChat: (chat: Chat | undefined) => set(() => ({ currentChat: chat })),
}),