Skip to content

Commit

Permalink
Rename SettingsModal
Browse files Browse the repository at this point in the history
  • Loading branch information
enricoros committed Mar 27, 2023
1 parent 5c6e1e9 commit ed7333a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/Settings.tsx → components/SettingsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const isValidOpenAIApiKey = (apiKey?: string) =>
* @param {boolean} open Whether the Settings modal is open
* @param {() => void} onClose Call this to close the dialog from outside
*/
export function Settings({ open, onClose }: { open: boolean, onClose: () => void; }) {
export function SettingsModal({ open, onClose }: { open: boolean, onClose: () => void; }) {
const { apiKey, setApiKey, chatModelId, setChatModelId } = useSettingsStore(state => ({
apiKey: state.apiKey, setApiKey: state.setApiKey,
chatModelId: state.chatModelId, setChatModelId: state.setChatModelId,
Expand Down
4 changes: 2 additions & 2 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { ChatModels, SystemPurposeId, SystemPurposes } from '../lib/data';
import { Composer } from '../components/Composer';
import { Message, UiMessage } from '../components/Message';
import { NoSSR } from '../components/util/NoSSR';
import { isValidOpenAIApiKey, Settings } from '../components/Settings';
import { isValidOpenAIApiKey, SettingsModal } from '../components/SettingsModal';
import { useSettingsStore } from '../lib/store';


Expand Down Expand Up @@ -299,7 +299,7 @@ export default function Conversation() {
</Stack>

{/* Settings Modal */}
<Settings open={settingsShown} onClose={() => setSettingsShown(false)} />
<SettingsModal open={settingsShown} onClose={() => setSettingsShown(false)} />

</Container>
);
Expand Down

0 comments on commit ed7333a

Please sign in to comment.