Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env.example

This file was deleted.

3 changes: 0 additions & 3 deletions backend/.env.sample

This file was deleted.

2 changes: 1 addition & 1 deletion src/pages/Login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const Login: React.FC = () => {
setMessage(response.data.message);

if (response.data.message === 'Login successful') {
navigate("/home");
navigate("/");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Find route definitions to verify the correct post-login destination.

# Search for route definitions in the codebase
rg -n --type=tsx --type=ts -A 3 -B 3 'path.*["\']/(home)?' --glob '!node_modules'

Repository: GitMetricsLab/github_tracker

Length of output: 241


🏁 Script executed:

#!/bin/bash
# Search for route definitions and the root path handler
fd -e tsx -e ts | head -20

Repository: GitMetricsLab/github_tracker

Length of output: 629


🏁 Script executed:

#!/bin/bash
# Look for Router/Routes configuration
rg -n "path|Route" --type tsx --type ts -A 2 | head -40

Repository: GitMetricsLab/github_tracker

Length of output: 100


🏁 Script executed:

#!/bin/bash
# Check the App component to see routing setup
fd "App\\.tsx" -o "app\\.tsx" -o "index\\.tsx" | grep -E "(App|app|index)" | head -10

Repository: GitMetricsLab/github_tracker

Length of output: 208


🏁 Script executed:

cat -n src/Routes/Router.tsx

Repository: GitMetricsLab/github_tracker

Length of output: 1271


🏁 Script executed:

cat -n src/App.tsx

Repository: GitMetricsLab/github_tracker

Length of output: 1513


🏁 Script executed:

sed -n '30,45p' src/pages/Login/Login.tsx

Repository: GitMetricsLab/github_tracker

Length of output: 478


Correct the PR description to match the code.

The code correctly navigates to "/" (which displays the Home page), but the PR description incorrectly states the redirect is to "/home". There is no /home route defined in the application—only / (line 14 of src/Routes/Router.tsx). Update the PR description to accurately reflect that the redirect is to "/", not "/home".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/Login/Login.tsx` at line 37, The PR description incorrectly states
the login redirect goes to "/home" while the code in Login.tsx calls
navigate("/") (which routes to the Home page); update the PR description to
state the redirect is to "/" (matching navigate("/") in Login.tsx and the
defined route in Router.tsx) so the PR text accurately reflects the
implementation.

}
} catch (error: any) {
setMessage(error.response?.data?.message || "Something went wrong");
Expand Down
3 changes: 3 additions & 0 deletions src/pages/Signup/Signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ const navigate = useNavigate();

const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
console.log("backendUrl:", backendUrl);
console.log("env:", import.meta.env.VITE_BACKEND_URL);
try {

const response = await axios.post(`${backendUrl}/api/auth/signup`,
formData // Include cookies for session
);
Expand Down
Loading