JD
diff --git a/src/components/layouts/DashboardLayouts.tsx b/src/components/layouts/DashboardLayouts.tsx
index 2cf6ec6..b3aadb2 100644
--- a/src/components/layouts/DashboardLayouts.tsx
+++ b/src/components/layouts/DashboardLayouts.tsx
@@ -1,16 +1,24 @@
import React from "react";
import { Outlet } from "react-router-dom";
import AppSidebar from "../Sidebar";
-import { SidebarProvider, SidebarInset } from "../ui/sidebar";
+import { SidebarProvider, SidebarInset, SidebarTrigger } from "../ui/sidebar";
const DashboardLayout: React.FC = () => {
return (
-
-
-
+
+ {/* Mobile Header with Sidebar Trigger */}
+
+
+ {/* Main Content */}
+
+
+
+
);
diff --git a/src/pages/Earnings.tsx b/src/pages/Earnings.tsx
index 4de022f..ec4491d 100644
--- a/src/pages/Earnings.tsx
+++ b/src/pages/Earnings.tsx
@@ -134,43 +134,48 @@ const Earnings: React.FC = () => {
};
return (
-
+
{/* Header */}
-
+
-
Earnings
-
+
+ Earnings
+
+
Track your affiliate performance and payouts
-
-
{/* Stats Grid */}
-
+
{stats.map((stat, idx) => (
-
+
-
+
{stat.trend !== "neutral" && (
{
}`}
>
{stat.trend === "up" ? (
-
+
) : (
-
+
)}
-
{stat.change}
+
+ {stat.change}
+
)}
-
+
{stat.value}
-
{stat.label}
+
+ {stat.label}
+
{stat.trend === "neutral" && (
{stat.change}
)}
@@ -199,45 +208,45 @@ const Earnings: React.FC = () => {
{/* Next Payout Card */}
-
+
-
-
-
+
+
+
-
+
Next Scheduled Payout
-
+
October 15, 2025
-
+
Your earnings will be processed automatically
-
+
Estimated Amount
-
$450
-
- + pending approvals
+
+ $450
+
+ pending approvals
-
+
{/* Chart Section */}
-
-
+
+
-
+
Earnings Overview
-
+
Your performance over time
@@ -246,7 +255,7 @@ const Earnings: React.FC = () => {
setTimeframe(period)}
- className={`px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${
+ className={`px-2.5 sm:px-3 py-1.5 rounded-lg text-xs sm:text-sm font-medium transition-colors ${
timeframe === period
? "bg-indigo-600 text-white"
: "bg-gray-100 text-gray-600 hover:bg-gray-200"
@@ -257,7 +266,7 @@ const Earnings: React.FC = () => {
))}
-
+
@@ -269,9 +278,9 @@ const Earnings: React.FC = () => {
-
+
{
type="monotone"
dataKey="amount"
stroke="#6366f1"
- strokeWidth={3}
+ strokeWidth={2}
fill="url(#colorAmount)"
/>
@@ -292,46 +301,60 @@ const Earnings: React.FC = () => {
{/* Payment Methods */}
-
-
+
+
Payment Method
-
+
-
-
+
+
-
-
PayPal
-
+
+
+ PayPal
+
+
john@example.com
-
+
-
+
+ Add Payment Method
-
-
Quick Stats
+
+
+ Quick Stats
+
-
+
Total Transactions
- 142
+
+ 142
+
- Avg. Commission
- $87.68
+
+ Avg. Commission
+
+
+ $87.68
+
- Success Rate
- 98.2%
+
+ Success Rate
+
+
+ 98.2%
+
@@ -340,39 +363,42 @@ const Earnings: React.FC = () => {
{/* Transaction History */}
-
-
+
+
Recent Transactions
-
+
Your latest earnings and payouts
{transactionData.map((transaction, idx) => (
-
-
-
+
+
+
-
-
+
+
{transaction.type}
-
+
{transaction.date}
@@ -380,12 +406,12 @@ const Earnings: React.FC = () => {
-
-
+
+
{transaction.amount}
{
) : (
)}
- {transaction.status}
+
+ {transaction.status}
+
))}
-
-
+
+
View All Transactions →
@@ -413,19 +441,19 @@ const Earnings: React.FC = () => {
{/* Payout Request Modal */}
{showPayoutModal && (
-
-
+
+
{/* Modal Header */}
-
+
-
-
+
+
-
+
Request Payout
-
+
Withdraw your earnings
@@ -439,13 +467,15 @@ const Earnings: React.FC = () => {
{/* Modal Body */}
-
+
{/* Available Balance */}
-
+
Available Balance
-
$890.00
+
+ $890.00
+
Ready for withdrawal
@@ -464,11 +494,11 @@ const Earnings: React.FC = () => {
onChange={(e) => setPayoutAmount(e.target.value)}
placeholder="0.00"
max="890"
- className="w-full pl-10 pr-20 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent outline-none text-lg font-semibold"
+ className="w-full pl-10 pr-16 sm:pr-20 py-2.5 sm:py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent outline-none text-base sm:text-lg font-semibold"
/>
setPayoutAmount("890")}
- className="absolute right-2 top-1/2 transform -translate-y-1/2 px-3 py-1 bg-indigo-600 text-white text-sm rounded-md hover:bg-indigo-700 transition-colors"
+ className="absolute right-2 top-1/2 transform -translate-y-1/2 px-2.5 sm:px-3 py-1 bg-indigo-600 text-white text-xs sm:text-sm rounded-md hover:bg-indigo-700 transition-colors"
>
Max
@@ -483,14 +513,16 @@ const Earnings: React.FC = () => {
-
+
-
-
+
+
-
-
PayPal
-
+
+
+ PayPal
+
+
john@example.com
@@ -500,9 +532,9 @@ const Earnings: React.FC = () => {
{/* Processing Info */}
-
+
-
+
Processing Time
Payouts are typically processed within 24-48 hours on
@@ -512,22 +544,22 @@ const Earnings: React.FC = () => {
{/* Summary */}
-
-
+
+
Withdrawal Amount
${payoutAmount}
-
+
Processing Fee
$0.00
-
+
You'll Receive
-
+
${payoutAmount}
@@ -535,10 +567,10 @@ const Earnings: React.FC = () => {
{/* Modal Footer */}
-
+
setShowPayoutModal(false)}
- className="flex-1 px-4 py-3 border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors font-semibold text-gray-700"
+ className="flex-1 px-3 sm:px-4 py-2.5 sm:py-3 border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors font-semibold text-gray-700 text-sm sm:text-base"
>
Cancel
@@ -549,15 +581,15 @@ const Earnings: React.FC = () => {
Number(payoutAmount) < 50 ||
Number(payoutAmount) > 890
}
- className="flex-1 px-4 py-3 bg-gradient-to-r from-indigo-600 to-purple-600 text-white rounded-lg hover:from-indigo-700 hover:to-purple-700 transition-all font-semibold disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2"
+ className="flex-1 px-3 sm:px-4 py-2.5 sm:py-3 bg-gradient-to-r from-indigo-600 to-purple-600 text-white rounded-lg hover:from-indigo-700 hover:to-purple-700 transition-all font-semibold disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2 text-sm sm:text-base"
>
{isProcessing ? (
<>
-
- Processing...
+
+
Processing...
>
) : (
- <>Confirm Request>
+ <>Confirm>
)}
diff --git a/src/pages/Login.tsx b/src/pages/Login.tsx
index 53b80bb..03c243a 100644
--- a/src/pages/Login.tsx
+++ b/src/pages/Login.tsx
@@ -33,8 +33,8 @@ const Login: React.FC = () => {
-
-
+
+
Planpost Affiliate
diff --git a/src/pages/Overview.tsx b/src/pages/Overview.tsx
index ef85c1c..c69e07f 100644
--- a/src/pages/Overview.tsx
+++ b/src/pages/Overview.tsx
@@ -25,21 +25,25 @@ const MetricsCard = ({
trend,
bgColor,
}: MetricsCardProps) => (
-
-
-
-
+
+
+
+
{trend && (
-
+
{trend}
)}
-
{title}
-
{value}
- {subtitle &&
{subtitle}
}
+
+ {title}
+
+
{value}
+ {subtitle && (
+
{subtitle}
+ )}
);
@@ -54,19 +58,19 @@ const Overview = () => {
};
return (
-
+
{/* Header */}
-
-
+
+
Dashboard Overview
-
-
+
+
Track your affiliate performance and earnings
{/* Metrics Grid */}
-
+
{
{/* Referral Link Section */}
-
-
+
+
-
+
-
+
Your Referral Link
-
+
Share this link with your network to start earning commissions
@@ -114,12 +118,12 @@ const Overview = () => {
type="text"
value={referralLink}
readOnly
- className="w-full border-2 border-gray-200 rounded-lg px-4 py-3 bg-white focus:outline-none focus:border-blue-500 transition-colors font-mono text-sm"
+ className="w-full border-2 border-gray-200 rounded-lg px-3 sm:px-4 py-2.5 sm:py-3 bg-white focus:outline-none focus:border-blue-500 transition-colors font-mono text-xs sm:text-sm"
/>
{
{/* Quick Stats */}
-
-
-
+
+
+
Conversion Rate
-
12.5%
+
+ 12.5%
+
-
-
+
+
Average Commission
-
$37.65
-
↑ $2.15 from last month
+
$37.65
+
+ ↑ $2.15 from last month
+
-
-
+
+
Next Payout
-
$945
-
In 12 days
+
$945
+
In 12 days
diff --git a/src/pages/Referrals.tsx b/src/pages/Referrals.tsx
index e4b3ba2..5c54a17 100644
--- a/src/pages/Referrals.tsx
+++ b/src/pages/Referrals.tsx
@@ -127,68 +127,72 @@ const Referrals: React.FC = () => {
);
return (
-
+
{/* Header */}
-
-
Referrals
-
+
+
+ Referrals
+
+
Track and manage your affiliate referrals
{/* Stats Grid */}
-
+
{stats.map((stat, idx) => (
-
+
-
+
{stat.value}
-
{stat.label}
+
+ {stat.label}
+
{stat.change}
))}
{/* Referral Link Section */}
-
+
-
-
+
+
Your Referral Link
-
+
Share this link to earn commissions
-
-
+
+
{referralLink}
{copied ? (
<>
-
+
Copied!
>
) : (
<>
-
+
Copy Link
>
)}
@@ -201,36 +205,102 @@ const Referrals: React.FC = () => {
{/* Table Section */}
{/* Table Header */}
-
+
- {/* Table */}
-
+ {/* Mobile Card View */}
+
+ {filteredReferrals.map((r, idx) => (
+
+
+
+
+ {r.name.charAt(0)}
+
+
+
+ {r.name}
+
+
{r.email}
+
+
+
+ {r.status === "Active" ? (
+
+ ) : (
+
+ )}
+ {r.status}
+
+
+
+
+
+ Signup Date
+
+
{r.signupDate}
+
+
+
Country
+
{r.country}
+
+
+
+ Last Earning
+
+
+ {r.earnings}
+
+
+
+
+ Total Commission
+
+
+ {r.totalCommission}
+
+
+
+
+ ))}
+
+
+ {/* Desktop Table View */}
+
@@ -325,18 +395,18 @@ const Referrals: React.FC = () => {
{/* Table Footer */}
-
-
+
+
Showing{" "}
{filteredReferrals.length}{" "}
of {referrals.length}{" "}
referrals
-
+
Previous
-
+
Next