close ssr query

This commit is contained in:
archer
2023-06-26 15:05:34 +08:00
parent deb9be4160
commit 95066262b7
5 changed files with 12 additions and 32 deletions

View File

@@ -60,8 +60,9 @@ import { adaptChatItem_openAI } from '@/utils/plugin/openai';
const textareaMinH = '22px';
const Chat = ({ shareId, historyId }: { shareId: string; historyId: string }) => {
const Chat = () => {
const router = useRouter();
const { shareId = '', historyId = '' } = router.query as { shareId: string; historyId: string };
const theme = useTheme();
const ChatBox = useRef<HTMLDivElement>(null);
@@ -837,11 +838,4 @@ const Chat = ({ shareId, historyId }: { shareId: string; historyId: string }) =>
);
};
Chat.getInitialProps = ({ query, req }: any) => {
return {
shareId: query?.shareId || '',
historyId: query?.historyId || ''
};
};
export default Chat;