feat: add dashboard page with profile overview#37
feat: add dashboard page with profile overview#37Ayaanshaikh12243 wants to merge 3 commits intotarinagarwal:mainfrom
Conversation
|
Any update @tarinagarwal |
|
@Ayaanshaikh12243 Hey! im currently reviewing the PRs in order. I will review it soon! |
|
Okay just let me know when done after that If no issue in this pr then I can start with other 3 pr |
|
@Ayaanshaikh12243 sure thing! |
tarinagarwal
left a comment
There was a problem hiding this comment.
Few things to fix:
-
Remove the duplicate file client/src/dasboard.jsx (typo)
-
Use .tsx instead of .jsx - the project uses TypeScript
-
Don't create services/api.ts - we already have utils/api.ts, use that
-
The /users/me endpoint uses findFirst() which returns any random user, not the logged-in one. Need to add auth middleware and use req.user.id
-
Match the app's styling (Tailwind classes like other components)
|
Okay I will start working thank you for helping me out |
|
@tarinagarwal please check |
|
@Ayaanshaikh12243 Please attach the relevant screenshots. Make sure to star the repo and add #swoc with your PR |
tarinagarwal
left a comment
There was a problem hiding this comment.
Few things still need fixing:
-
ProfileOverview.jsx should be ProfileOverview.tsx (project uses TypeScript)
-
The import in dashboardService.ts won't work. api.ts doesn't have a default export, it exports individual functions. Either add your function directly to utils/api.ts or fix the import.
-
server/routes/users.js is incomplete. It only exports the middleware but doesn't create a router with the /me endpoint. You need to create an express router and add the GET /me route.
-
The project already has authenticateToken middleware in server/middleware/auth.js. Use that instead of creating a new one.
-
Use Tailwind classes for styling instead of inline styles. Check other components for reference.
🧭 Dashboard – Profile Overview (PR-1)
This PR introduces the initial dashboard setup as part of the first milestone for the dashboard feature.
✨ What’s included
/dashboardroute🧩 Scope
This PR focuses only on the basic layout and profile section as discussed in the issue.
Additional sections like learning progress, content, stats, and activity will be added incrementally in future PRs.
🧪 Notes
🔗 Related Issue
Closes #<ISSUE_NUMBER>