feat: add professor workspace front-end - #4
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
| const onSubmit = async (event: FormEvent) => { | ||
| event.preventDefault(); | ||
| const res = await fetch('http://localhost:4000/auth/login', { | ||
| method: 'POST', | ||
| headers: { 'Content-Type': 'application/json' }, | ||
| body: JSON.stringify({ email, password }), | ||
| }); | ||
| const data = await res.json(); |
There was a problem hiding this comment.
Avoid hard‑coding API host in login form
The login page posts to http://localhost:4000/auth/login directly. When the web UI is served from Docker or a deployed environment, the API will rarely be reachable at localhost, so form submissions will fail with network errors. The rest of the code already uses environment variables for API URLs; this client component should do the same or proxy through the Next.js server instead of baking a development host into the bundle.
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68dc28a98ffc83298dc7428b4c2d8710