Skip to content

Commit

Permalink
feat: fix show key configuration when do not set key in server side a…
Browse files Browse the repository at this point in the history
…nd client side.
  • Loading branch information
guangzhengli committed Jun 13, 2023
1 parent 8ab03fa commit da0f08d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -516,12 +516,6 @@ const Home: React.FC<HomeProps> = ({ serverSideApiKeyIsSet }) => {
}
}, [selectedConversation]);

useEffect(() => {
if (!serverSideApiKeyIsSet) {
handlekeyConfigurationButtonClick();
}
});

useEffect(() => {
const theme = localStorage.getItem('theme');
if (theme) {
Expand Down Expand Up @@ -576,6 +570,12 @@ const Home: React.FC<HomeProps> = ({ serverSideApiKeyIsSet }) => {
}
}, [serverSideApiKeyIsSet]);

useEffect(() => {
if (!serverSideApiKeyIsSet && !keyConfiguration.apiKey && !keyConfiguration.azureApiKey) {
handlekeyConfigurationButtonClick();
}
});

return (
<>
<Head>
Expand Down

0 comments on commit da0f08d

Please sign in to comment.