fix setting style

This commit is contained in:
2023-03-16 14:04:08 +08:00
parent 648040659b
commit 71dbe86520
2 changed files with 17 additions and 10 deletions

View File

@@ -1,11 +1,11 @@
import { useState } from "preact/hooks";
import { StateUpdater, useState } from "preact/hooks";
import type { ChatStore } from "./app";
import ChatGPT, { ChunkMessage } from "./chatgpt";
import Settings from "./settings";
export default function ChatBOX(props: {
chatStore: ChatStore;
setChatStore: (cs: ChatStore) => void;
setShowSettings: StateUpdater<boolean>;
}) {
const { chatStore, setChatStore } = props;
const [inputMsg, setInputMsg] = useState("");
@@ -127,15 +127,9 @@ export default function ChatBOX(props: {
setChatStore({ ...chatStore });
};
const [showSettings, setShowSettings] = useState(false);
const { setShowSettings } = props;
return (
<div className="grow flex flex-col p-4">
<Settings
chatStore={chatStore}
setChatStore={setChatStore}
show={showSettings}
setShow={setShowSettings}
/>
<p className="cursor-pointer" onClick={() => setShowSettings(true)}>
<div>
<button className="underline">