Krish-05 commited on
Commit
38a896a
·
verified ·
1 Parent(s): 51c3281

Update frontend/src/App.jsx

Browse files
Files changed (1) hide show
  1. frontend/src/App.jsx +5 -7
frontend/src/App.jsx CHANGED
@@ -9,7 +9,6 @@ const mockUser = {
9
  isLoggedIn: true,
10
  };
11
 
12
-
13
  // =================================================================================
14
  // Chat Components (ChatPage and ChatInput)
15
  // =================================================================================
@@ -60,7 +59,6 @@ const ChatInput = ({ onSendMessage, isLoading, setInputText, inputText }) => {
60
  }
61
  }, [mediaBlobUrl, status, setInputText]);
62
 
63
-
64
  const handleTextChange = (e) => {
65
  setInputText(e.target.value);
66
  };
@@ -122,7 +120,6 @@ const ChatInput = ({ onSendMessage, isLoading, setInputText, inputText }) => {
122
  );
123
  };
124
 
125
-
126
  const ChatPage = () => {
127
  const [chatHistory, setChatHistory] = useState([]);
128
  const [isSending, setIsSending] = useState(false);
@@ -237,9 +234,8 @@ const ChatPage = () => {
237
  );
238
  };
239
 
240
-
241
  // =================================================================================
242
- // Auth Components (Login and SignUp) - No changes needed here
243
  // =================================================================================
244
 
245
  const AuthForm = ({ isLogin = false }) => {
@@ -255,6 +251,8 @@ const AuthForm = ({ isLogin = false }) => {
255
  setError('Please fill in all fields.');
256
  return;
257
  }
 
 
258
  mockUser.isLoggedIn = true;
259
  navigate('/chat');
260
  };
@@ -304,11 +302,12 @@ const Header = ({ user }) => {
304
  return (
305
  <header className="app-header">
306
  <div className="logo">
307
- <img src={chatbotLogo} alt="Dobby Logo" className="header-logo" />
308
  <div className="brand-names">
309
  <span className="main-brand">Dobby</span>
310
  <span className="sub-brand">GUVI Assistant</span>
311
  </div>
 
312
  </div>
313
  <nav>
314
  {user && user.isLoggedIn ? (
@@ -324,7 +323,6 @@ const Header = ({ user }) => {
324
  );
325
  };
326
 
327
-
328
  function App() {
329
  const [user] = useState(mockUser);
330
 
 
9
  isLoggedIn: true,
10
  };
11
 
 
12
  // =================================================================================
13
  // Chat Components (ChatPage and ChatInput)
14
  // =================================================================================
 
59
  }
60
  }, [mediaBlobUrl, status, setInputText]);
61
 
 
62
  const handleTextChange = (e) => {
63
  setInputText(e.target.value);
64
  };
 
120
  );
121
  };
122
 
 
123
  const ChatPage = () => {
124
  const [chatHistory, setChatHistory] = useState([]);
125
  const [isSending, setIsSending] = useState(false);
 
234
  );
235
  };
236
 
 
237
  // =================================================================================
238
+ // Auth Components (Login and SignUp)
239
  // =================================================================================
240
 
241
  const AuthForm = ({ isLogin = false }) => {
 
251
  setError('Please fill in all fields.');
252
  return;
253
  }
254
+ // In a real app, you'd integrate with Firebase or your backend for authentication
255
+ // For this mock, we just set isLoggedIn to true
256
  mockUser.isLoggedIn = true;
257
  navigate('/chat');
258
  };
 
302
  return (
303
  <header className="app-header">
304
  <div className="logo">
305
+ {/* Changed order: Dobby text first, then logo */}
306
  <div className="brand-names">
307
  <span className="main-brand">Dobby</span>
308
  <span className="sub-brand">GUVI Assistant</span>
309
  </div>
310
+ <img src={chatbotLogo} alt="Dobby Logo" className="header-logo" />
311
  </div>
312
  <nav>
313
  {user && user.isLoggedIn ? (
 
323
  );
324
  };
325
 
 
326
  function App() {
327
  const [user] = useState(mockUser);
328