Skip to content

Commit

Permalink
fix bdays dashboard for new users
Browse files Browse the repository at this point in the history
  • Loading branch information
dreth committed Aug 9, 2024
1 parent 2f406d9 commit 41580ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions frontend/app/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,10 @@ export default function Dashboard() {
try {
const response = await getUserData(token);
const birthdays = response.birthdays;
setOriginalBirthdays(birthdays);
setBirthdays(birthdays);
if (birthdays) {
setOriginalBirthdays(birthdays);
setBirthdays(birthdays);
}
} catch (error) {
console.error("Error fetching user data", error);
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/lib/api/apiService.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const prefix = "/api";
// Create an Axios instance
const api = axios.create({
// UNCOMMENT THE LINE BELOW FOR LOCAL TESTING
// baseURL: "http://localhost:8418",
// baseURL: "http://localhost:8417",
headers: {
"Content-Type": "application/json",
},
Expand Down

0 comments on commit 41580ee

Please sign in to comment.