Skip to content

Commit

Permalink
Update App.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
AthanaD authored Jan 2, 2024
1 parent 66216c6 commit 5005bb7
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,18 @@ function App() {
}
}, [initialiseNewChat, setApiKey, setChats, setCurrentChatIndex, setTheme]);

const handlePasswordSubmit = () => {
if (password === process.env.REACT_APP_ACCESS_PASSWORD) {
setIsAuthenticated(true);
setShowPasswordModal(false);
} else {
alert('Incorrect password');
}
};
const handlePasswordSubmit = () => {
// 添加的调试信息
console.log("ENV Password:", process.env.REACT_APP_ACCESS_PASSWORD);
console.log("Entered Password:", password);

if (password === process.env.REACT_APP_ACCESS_PASSWORD) {
setIsAuthenticated(true);
setShowPasswordModal(false);
} else {
alert('Incorrect password');
}
};

return (
<div className='overflow-hidden w-full h-full relative'>
Expand Down

0 comments on commit 5005bb7

Please sign in to comment.