Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#5025 from jiangying000/main
Browse files Browse the repository at this point in the history
fix typo in app/components/chat.tsx
  • Loading branch information
Dogtiti authored Jul 16, 2024
2 parents 1779f1f + 47d27c1 commit ec95292
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,11 @@ function useSubmitHandler() {
};
}

export type RenderPompt = Pick<Prompt, "title" | "content">;
export type RenderPrompt = Pick<Prompt, "title" | "content">;

export function PromptHints(props: {
prompts: RenderPompt[];
onPromptSelect: (prompt: RenderPompt) => void;
prompts: RenderPrompt[];
onPromptSelect: (prompt: RenderPrompt) => void;
}) {
const noPrompts = props.prompts.length === 0;
const [selectIndex, setSelectIndex] = useState(0);
Expand Down Expand Up @@ -727,7 +727,7 @@ function _Chat() {

// prompt hints
const promptStore = usePromptStore();
const [promptHints, setPromptHints] = useState<RenderPompt[]>([]);
const [promptHints, setPromptHints] = useState<RenderPrompt[]>([]);
const onSearch = useDebouncedCallback(
(text: string) => {
const matchedPrompts = promptStore.search(text);
Expand Down Expand Up @@ -812,7 +812,7 @@ function _Chat() {
setAutoScroll(true);
};

const onPromptSelect = (prompt: RenderPompt) => {
const onPromptSelect = (prompt: RenderPrompt) => {
setTimeout(() => {
setPromptHints([]);

Expand Down

0 comments on commit ec95292

Please sign in to comment.