-
Notifications
You must be signed in to change notification settings - Fork 107
feat: refined DashboardPage #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughIntroduces a new DashboardPage component that renders a comprehensive dashboard layout with authentication integration, performance metrics, recent activity tracking, sponsorship matching, creator collaborations, and tabbed analytics. The page composes multiple UI components using a responsive grid-based layout with optional chaining for safe data access. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Areas requiring attention:
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai help |
ChatThere are 3 ways to chat with CodeRabbit:
CodeRabbit commands
Other keywords and placeholders
CodeRabbit configuration file (
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🧹 Nitpick comments (4)
Frontend/src/pages/DashboardPage.tsx (4)
33-36: Remove empty line.Line 36 contains unnecessary whitespace. This may be leftover from removed code.
Apply this diff:
export default function DashboardPage() { const { user } = useAuth() - - return (
92-111: Consider dynamic data integration and handling negative growth.The performance metrics use hardcoded values, which is acceptable for initial implementation but should eventually be replaced with real data. Additionally, the growth indicators (line 108) always display in green with a "+" prefix, which doesn't account for negative growth or neutral changes.
Future improvements:
- Integrate with backend API to fetch real performance metrics
- Add conditional styling for growth: green for positive, red for negative, gray for neutral
- Add loading and error states
Example for conditional growth styling:
<p className={`text-xs mt-1 ${parseFloat(i.growth) >= 0 ? 'text-green-600' : 'text-red-600'}`}> {i.growth} this month </p>
187-214: Replace hardcoded insights with dynamic data.The insights section uses static placeholder content that doesn't reflect actual user data. While acceptable for prototyping, this should be replaced with real analytics-driven insights.
Future improvements:
- Integrate with analytics API to fetch real insights
- Add loading skeleton for insights section
- Handle cases where no insights are available
- Consider personalizing insights based on user's specific metrics
218-248: Consider deferring placeholder tabs.All three tabs (Analytics, Sponsorships, Collaborations) contain only "coming soon" placeholders with no functional content. This may create user frustration when clicking through tabs with no value.
Consider either:
- Remove the tabs section entirely until content is ready
- Provide more specific timelines or subscribe options: "Q1 2026 - Subscribe for updates"
- Add preview screenshots of what's coming to maintain user interest
- Implement at least one tab with basic content to demonstrate value
The tabs also duplicate some content already shown above (e.g., "Collaborations" tab when there's already a Creator Collaborations section), which may confuse users about navigation.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Frontend/src/pages/DashboardPage.tsx(1 hunks)
🔇 Additional comments (3)
Frontend/src/pages/DashboardPage.tsx (3)
74-74: Layout approach properly addresses issue #140.The vertical stacking layout with
space-y-10and consistentmax-w-7xlconstraint successfully implements the suggested fix from issue #140, moving away from problematic side-by-side grid layouts that caused overlapping and misalignment.
1-31: NotificationDropdown component does not exist in the codebase.The search confirmed that the NotificationDropdown component is not present anywhere in the repository, and there are no references to it. However, the PR description explicitly claims "integrates a new NotificationDropdown component with badge and dropdown panel" and "Simplifies header to keep only Notification and New Campaign buttons."
This represents a discrepancy between the PR description and the actual implementation. The DashboardPage.tsx header (lines 62-69) only contains the New Campaign button, with no notification component.
Clarification needed: Is the NotificationDropdown feature:
- Missing and should be implemented as part of this PR?
- Intentionally deferred to a future PR?
- Or was the PR description written aspirationally and should be updated to reflect the actual changes?
143-156: The CollaborationsPage import is broken—the component does not exist in the repository.The import on line 31 (
import CollaborationsPage from "./Collaborations") references a file that is not present in the codebase. A search across the entire repository found no Collaborations.tsx, Collaborations.ts, or related files. The code at lines 143-156 attempts to render a non-existent component, which will cause a build or runtime error.The actual issue is not about embedding design concerns, but about the missing component. Resolve the import before addressing layout structure.
Likely an incorrect or invalid review comment.
| export default function DashboardPage() { | ||
| const { user } = useAuth() | ||
|
|
||
|
|
||
|
|
||
| return ( | ||
| <div className="min-h-screen flex flex-col bg-gray-50 text-gray-900"> | ||
| {/* HEADER */} | ||
| <header className="sticky top-0 z-50 w-full border-b border-gray-200 bg-white/90 backdrop-blur-md shadow-sm"> | ||
| <div className="max-w-7xl mx-auto px-6 h-16 flex items-center justify-between"> | ||
| <div className="flex items-center gap-3"> | ||
| <Rocket className="h-6 w-6 text-purple-600" /> | ||
| <span className="font-bold text-xl">Inpact</span> | ||
| <nav className="hidden md:flex items-center space-x-6 ml-6 text-sm text-gray-600"> | ||
| <Link to="/dashboard" className="hover:text-purple-600 flex items-center gap-2"> | ||
| <LayoutDashboard className="h-4 w-4" /> Dashboard | ||
| </Link> | ||
| <Link to="/dashboard/sponsorships" className="hover:text-purple-600 flex items-center gap-2"> | ||
| <Briefcase className="h-4 w-4" /> Sponsorships | ||
| </Link> | ||
| <Link to="/dashboard/collaborations" className="hover:text-purple-600 flex items-center gap-2"> | ||
| <Users className="h-4 w-4" /> Collaborations | ||
| </Link> | ||
| <Link to="/dashboard/messages" className="hover:text-purple-600 flex items-center gap-2"> | ||
| <MessageSquare className="h-4 w-4" /> Messages | ||
| </Link> | ||
| </nav> | ||
| </div> | ||
|
|
||
| <div className="flex items-center gap-4"> | ||
|
|
||
| <CreateCampaignDialog> | ||
| <Button className="bg-purple-600 hover:bg-purple-700 text-white px-5 py-2 rounded-lg text-sm"> | ||
| <DollarSign className="mr-2 h-4 w-4" /> New Campaign | ||
| </Button> | ||
| </CreateCampaignDialog> | ||
| </div> | ||
| </div> | ||
| </header> | ||
|
|
||
| {/* MAIN CONTENT */} | ||
| <main className="w-full max-w-7xl mx-auto px-6 py-10 space-y-10"> | ||
| {/* HERO SECTION */} | ||
| <section className="bg-gradient-to-r from-purple-600 to-indigo-600 text-white rounded-2xl p-8 shadow-lg"> | ||
| <h1 className="text-3xl font-bold"> | ||
| Welcome back, {user?.name || "Creator"} 👋 | ||
| </h1> | ||
| <p className="mt-2 text-white/80"> | ||
| Your performance, sponsorships, and collaborations — all in one place. | ||
| </p> | ||
| </section> | ||
|
|
||
| {/* PERFORMANCE OVERVIEW */} | ||
| <section> | ||
| <Card className="rounded-2xl border-gray-200 shadow-sm"> | ||
| <CardHeader> | ||
| <CardTitle>Performance Overview</CardTitle> | ||
| <CardDescription>Monthly snapshot of your brand’s performance.</CardDescription> | ||
| </CardHeader> | ||
| <CardContent className="grid sm:grid-cols-2 lg:grid-cols-4 gap-6"> | ||
| {[ | ||
| { title: "Revenue", icon: DollarSign, value: "$45,200", growth: "+18%" }, | ||
| { title: "Active Campaigns", icon: Briefcase, value: "12", growth: "+2" }, | ||
| { title: "Collaborations", icon: Users, value: "8", growth: "+3" }, | ||
| { title: "Engagement", icon: BarChart3, value: "5.3%", growth: "+1.1%" }, | ||
| ].map((i) => ( | ||
| <div | ||
| key={i.title} | ||
| className="p-5 rounded-xl bg-white border border-gray-100 shadow-sm hover:shadow-md transition" | ||
| > | ||
| <div className="flex items-center justify-between"> | ||
| <h3 className="text-sm text-gray-600">{i.title}</h3> | ||
| <i.icon className="h-5 w-5 text-purple-600" /> | ||
| </div> | ||
| <p className="text-2xl font-bold mt-3">{i.value}</p> | ||
| <p className="text-xs text-green-600 mt-1">{i.growth} this month</p> | ||
| </div> | ||
| ))} | ||
| </CardContent> | ||
| </Card> | ||
| </section> | ||
|
|
||
| {/* PERFORMANCE CHARTS */} | ||
| <section> | ||
| <Card className="rounded-2xl border-gray-200 shadow-sm"> | ||
| <CardHeader> | ||
| <CardTitle>Analytics & Trends</CardTitle> | ||
| <CardDescription> | ||
| Engagement rate, audience growth, and sponsorship conversions. | ||
| </CardDescription> | ||
| </CardHeader> | ||
| <CardContent> | ||
| <PerformanceMetrics /> | ||
| </CardContent> | ||
| </Card> | ||
| </section> | ||
|
|
||
| {/* RECENT ACTIVITY */} | ||
| <section> | ||
| <Card className="rounded-2xl border-gray-200 shadow-sm"> | ||
| <CardHeader> | ||
| <CardTitle>Recent Activity</CardTitle> | ||
| <CardDescription>Your latest sponsorships and collaboration updates.</CardDescription> | ||
| </CardHeader> | ||
| <CardContent> | ||
| <RecentActivity /> | ||
| </CardContent> | ||
| </Card> | ||
| </section> | ||
|
|
||
| {/* CREATOR COLLABORATIONS */} | ||
| <section className="w-full"> | ||
| <Card className="rounded-2xl border-gray-200 shadow-sm w-full"> | ||
| <CardHeader> | ||
| <CardTitle>Creator Collaborations</CardTitle> | ||
| <CardDescription> | ||
| Explore creators with aligned audiences and engagement. | ||
| </CardDescription> | ||
| </CardHeader> | ||
| <CardContent className="p-0 overflow-hidden"> | ||
| <CollaborationsPage /> | ||
| </CardContent> | ||
| </Card> | ||
| </section> | ||
|
|
||
| {/* AI-MATCHED SPONSORSHIPS */} | ||
| <section> | ||
| <Card className="rounded-2xl border-gray-200 shadow-sm"> | ||
| <CardHeader className="flex justify-between items-center"> | ||
| <div> | ||
| <CardTitle>AI-Matched Sponsorships</CardTitle> | ||
| <CardDescription>Smart recommendations for you.</CardDescription> | ||
| </div> | ||
| <Button | ||
| size="sm" | ||
| variant="outline" | ||
| className="border-purple-600 text-purple-600 hover:bg-purple-50" | ||
| > | ||
| <RefreshCw className="mr-1 h-4 w-4" /> Refresh | ||
| </Button> | ||
| </CardHeader> | ||
| <CardContent> | ||
| <SponsorshipMatches creatorId={user?.id || ""} /> | ||
| </CardContent> | ||
| </Card> | ||
| </section> | ||
|
|
||
| {/* INSIGHTS & TRENDS */} | ||
| <section> | ||
| <Card className="rounded-2xl border-gray-200 shadow-sm"> | ||
| <CardHeader> | ||
| <CardTitle>Insights & Highlights</CardTitle> | ||
| <CardDescription>Key trends from your recent activity.</CardDescription> | ||
| </CardHeader> | ||
| <CardContent className="grid sm:grid-cols-2 lg:grid-cols-3 gap-6"> | ||
| {[ | ||
| { | ||
| icon: TrendingUp, | ||
| title: "Audience Growth Spike", | ||
| desc: "+12% increase due to consistent posting.", | ||
| }, | ||
| { | ||
| icon: Sparkles, | ||
| title: "Top Performing Post", | ||
| desc: "‘AI in Tech’ gained 7k engagements last week.", | ||
| }, | ||
| { | ||
| icon: Heart, | ||
| title: "Most Engaged Audience", | ||
| desc: "18–24 age group contributes 42% engagement.", | ||
| }, | ||
| ].map((x) => ( | ||
| <div | ||
| key={x.title} | ||
| className="p-5 bg-white rounded-xl border border-gray-100 shadow-sm hover:shadow-md transition" | ||
| > | ||
| <x.icon className="h-5 w-5 text-purple-600 mb-2" /> | ||
| <h3 className="font-semibold">{x.title}</h3> | ||
| <p className="text-sm text-gray-600 mt-1">{x.desc}</p> | ||
| </div> | ||
| ))} | ||
| </CardContent> | ||
| </Card> | ||
| </section> | ||
|
|
||
| {/* FINAL TABS SECTION */} | ||
| <section> | ||
| <Tabs defaultValue="analytics" className="w-full"> | ||
| <TabsList className="bg-gray-100 rounded-lg w-fit mb-5 mx-auto"> | ||
| <TabsTrigger value="analytics">Analytics</TabsTrigger> | ||
| <TabsTrigger value="sponsorships">Sponsorships</TabsTrigger> | ||
| <TabsTrigger value="collabs">Collaborations</TabsTrigger> | ||
| </TabsList> | ||
|
|
||
| <TabsContent value="analytics"> | ||
| <Card className="rounded-2xl shadow-sm text-center py-10 w-full"> | ||
| <h3 className="text-xl font-semibold">Analytics Overview</h3> | ||
| <p className="text-gray-500 mt-2">Comprehensive data coming soon.</p> | ||
| </Card> | ||
| </TabsContent> | ||
|
|
||
| <TabsContent value="sponsorships"> | ||
| <Card className="rounded-2xl shadow-sm text-center py-10 w-full"> | ||
| <h3 className="text-xl font-semibold">Sponsorship Insights</h3> | ||
| <p className="text-gray-500 mt-2">ROI and conversion tracking coming soon.</p> | ||
| </Card> | ||
| </TabsContent> | ||
|
|
||
| <TabsContent value="collabs"> | ||
| <Card className="rounded-2xl shadow-sm text-center py-10 w-full"> | ||
| <h3 className="text-xl font-semibold">Collaboration Analytics</h3> | ||
| <p className="text-gray-500 mt-2">Synergy graphs and overlap data soon.</p> | ||
| </Card> | ||
| </TabsContent> | ||
| </Tabs> | ||
| </section> | ||
| </main> | ||
| </div> | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Add error handling and loading states.
The component lacks error boundaries, loading states, and error handling for several potential failure points:
- Authentication failure: If
useAuth()throws or returns undefined, the component may crash - Child component errors: Components like
PerformanceMetrics,RecentActivity, andSponsorshipMatchesmay fail to load data - No loading indicators: Users see a blank or partially rendered page during data fetching
Add basic error handling:
export default function DashboardPage() {
const { user, loading, error } = useAuth()
if (loading) {
return (
<div className="min-h-screen flex items-center justify-center">
<p>Loading dashboard...</p>
</div>
)
}
if (error || !user) {
return (
<div className="min-h-screen flex items-center justify-center">
<p>Unable to load dashboard. Please log in.</p>
</div>
)
}
return (
// ... existing JSX
)
}Additionally, consider wrapping the entire page in an ErrorBoundary component to gracefully handle runtime errors in child components.
🤖 Prompt for AI Agents
In Frontend/src/pages/DashboardPage.tsx around lines 33-251, the page currently
assumes useAuth always returns a user and that child components never fail; add
robust loading and error handling: destructure { user, loading, error } from
useAuth, return a centered loading placeholder when loading is true, and return
a centered error/login prompt when error or !user; prevent rendering components
that require a user (e.g. pass creatorId only when user.id exists or skip
SponsorshipMatches until user is available); wrap main content (or at least
PerformanceMetrics, RecentActivity, SponsorshipMatches, CollaborationsPage) in
an ErrorBoundary (or try/catch + fallback UI) and add simple loading/skeleton
placeholders for sections while their data loads.
| <header className="sticky top-0 z-50 w-full border-b border-gray-200 bg-white/90 backdrop-blur-md shadow-sm"> | ||
| <div className="max-w-7xl mx-auto px-6 h-16 flex items-center justify-between"> | ||
| <div className="flex items-center gap-3"> | ||
| <Rocket className="h-6 w-6 text-purple-600" /> | ||
| <span className="font-bold text-xl">Inpact</span> | ||
| <nav className="hidden md:flex items-center space-x-6 ml-6 text-sm text-gray-600"> | ||
| <Link to="/dashboard" className="hover:text-purple-600 flex items-center gap-2"> | ||
| <LayoutDashboard className="h-4 w-4" /> Dashboard | ||
| </Link> | ||
| <Link to="/dashboard/sponsorships" className="hover:text-purple-600 flex items-center gap-2"> | ||
| <Briefcase className="h-4 w-4" /> Sponsorships | ||
| </Link> | ||
| <Link to="/dashboard/collaborations" className="hover:text-purple-600 flex items-center gap-2"> | ||
| <Users className="h-4 w-4" /> Collaborations | ||
| </Link> | ||
| <Link to="/dashboard/messages" className="hover:text-purple-600 flex items-center gap-2"> | ||
| <MessageSquare className="h-4 w-4" /> Messages | ||
| </Link> | ||
| </nav> | ||
| </div> | ||
|
|
||
| <div className="flex items-center gap-4"> | ||
|
|
||
| <CreateCampaignDialog> | ||
| <Button className="bg-purple-600 hover:bg-purple-700 text-white px-5 py-2 rounded-lg text-sm"> | ||
| <DollarSign className="mr-2 h-4 w-4" /> New Campaign | ||
| </Button> | ||
| </CreateCampaignDialog> | ||
| </div> | ||
| </div> | ||
| </header> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Header implementation doesn't match PR description.
The PR description states the header was simplified to "keep only Notification and New Campaign buttons," but the implementation includes:
- Full navigation menu with Dashboard, Sponsorships, Collaborations, and Messages links (lines 46-59)
- Only the New Campaign button in the actions area (lines 62-69)
- No notification button or dropdown
This suggests either the PR description is inaccurate or the notification feature wasn't fully implemented.
Please clarify the intended header design and update either the code or the PR description accordingly.
| <CardHeader className="flex justify-between items-center"> | ||
| <div> | ||
| <CardTitle>AI-Matched Sponsorships</CardTitle> | ||
| <CardDescription>Smart recommendations for you.</CardDescription> | ||
| </div> | ||
| <Button | ||
| size="sm" | ||
| variant="outline" | ||
| className="border-purple-600 text-purple-600 hover:bg-purple-50" | ||
| > | ||
| <RefreshCw className="mr-1 h-4 w-4" /> Refresh | ||
| </Button> | ||
| </CardHeader> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CardHeader flex layout may not work as intended.
Applying flex layout classes directly to <CardHeader> (line 161) may not achieve the desired layout since CardHeader likely renders its own internal structure. The flex container should wrap the content inside CardHeader.
Apply this diff to fix the layout:
- <CardHeader className="flex justify-between items-center">
- <div>
+ <CardHeader>
+ <div className="flex justify-between items-center">
+ <div>
- <CardTitle>AI-Matched Sponsorships</CardTitle>
- <CardDescription>Smart recommendations for you.</CardDescription>
- </div>
- <Button
- size="sm"
- variant="outline"
- className="border-purple-600 text-purple-600 hover:bg-purple-50"
- >
- <RefreshCw className="mr-1 h-4 w-4" /> Refresh
- </Button>
+ <CardTitle>AI-Matched Sponsorships</CardTitle>
+ <CardDescription>Smart recommendations for you.</CardDescription>
+ </div>
+ <Button
+ size="sm"
+ variant="outline"
+ className="border-purple-600 text-purple-600 hover:bg-purple-50"
+ >
+ <RefreshCw className="mr-1 h-4 w-4" /> Refresh
+ </Button>
+ </div>
</CardHeader>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <CardHeader className="flex justify-between items-center"> | |
| <div> | |
| <CardTitle>AI-Matched Sponsorships</CardTitle> | |
| <CardDescription>Smart recommendations for you.</CardDescription> | |
| </div> | |
| <Button | |
| size="sm" | |
| variant="outline" | |
| className="border-purple-600 text-purple-600 hover:bg-purple-50" | |
| > | |
| <RefreshCw className="mr-1 h-4 w-4" /> Refresh | |
| </Button> | |
| </CardHeader> | |
| <CardHeader> | |
| <div className="flex justify-between items-center"> | |
| <div> | |
| <CardTitle>AI-Matched Sponsorships</CardTitle> | |
| <CardDescription>Smart recommendations for you.</CardDescription> | |
| </div> | |
| <Button | |
| size="sm" | |
| variant="outline" | |
| className="border-purple-600 text-purple-600 hover:bg-purple-50" | |
| > | |
| <RefreshCw className="mr-1 h-4 w-4" /> Refresh | |
| </Button> | |
| </div> | |
| </CardHeader> |
🤖 Prompt for AI Agents
Frontend/src/pages/DashboardPage.tsx around lines 161 to 173: CardHeader
currently receives flex utility classes which may be ignored by the component;
remove className="flex justify-between items-center" from CardHeader and instead
wrap the existing children (the left title/description block and the Button) in
a plain div that has className="flex justify-between items-center" so the layout
is applied to the actual DOM container holding those elements.
| <Button | ||
| size="sm" | ||
| variant="outline" | ||
| className="border-purple-600 text-purple-600 hover:bg-purple-50" | ||
| > | ||
| <RefreshCw className="mr-1 h-4 w-4" /> Refresh | ||
| </Button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refresh button has no functionality.
The Refresh button renders but has no onClick handler, making it non-functional. Users clicking it will see no response.
You'll need to:
- Add state management for sponsorship data
- Implement a refresh function that fetches updated matches
- Add loading state during refresh
Would you like me to generate the implementation for the refresh functionality?
🤖 Prompt for AI Agents
In Frontend/src/pages/DashboardPage.tsx around lines 166-172, the Refresh button
is missing an onClick and related state/logic; add component state for
sponsorship/matches (e.g., matches and isRefreshing), implement an async
refreshMatches function that sets isRefreshing=true, fetches the updated
sponsorship/match data from the existing API/data loader, updates the matches
state, handles errors, and then sets isRefreshing=false, and wire that function
to the Button's onClick; also disable the button and show a loading indicator
while isRefreshing is true so users get feedback during refresh.
| </Button> | ||
| </CardHeader> | ||
| <CardContent> | ||
| <SponsorshipMatches creatorId={user?.id || ""} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty string fallback for user ID may cause errors.
Using user?.id || "" passes an empty string when the user is not authenticated. If SponsorshipMatches expects a valid creator ID and makes API calls with it, this could result in errors or unexpected behavior.
Consider these approaches:
Approach 1: Conditional rendering
{user?.id ? (
<SponsorshipMatches creatorId={user.id} />
) : (
<p className="text-gray-500 text-center py-4">
Please log in to view sponsorship matches.
</p>
)}Approach 2: Early return in component
if (!user?.id) {
return <div className="min-h-screen flex items-center justify-center">
<p>Please log in to view your dashboard.</p>
</div>
}🤖 Prompt for AI Agents
In Frontend/src/pages/DashboardPage.tsx around line 175, passing user?.id || ""
into SponsorshipMatches can pass an empty string when unauthenticated and cause
API errors; change to conditionally render SponsorshipMatches only when user?.id
exists (show a login prompt or placeholder otherwise) or ensure the
page/component returns early when no user id is present so that
SponsorshipMatches only ever receives a valid creatorId.
|
@chandansgowda Please review this and merge this pr, if any issue please let me know , I will fix that instant |
Closes #140
📝 Description
This PR refines the
DashboardPagewith an improved layout and integrates a newNotificationDropdowncomponent for better interactivity and user experience.It simplifies the dashboard header, enhances responsiveness, and ensures all sections are visually balanced and aligned. The goal was to modernize the UI and improve navigation clarity.
🔧 Changes Made
📷 Screenshots or Visual Changes
Before:
Dashboard sections were unevenly spaced, cluttered, and missing notification UI.
After:
(Attach a screenshot or short screen recording if possible)
https://github.com/user-attachments/assets/1115f267-836e-4eaa-b8b9-5d58a9c2b341
🤝 Collaboration
Collaborated with:
@aniket866✅ Checklist
src/pages/DashboardPage.tsxis modified in this PR.Summary by CodeRabbit