@chainloyalty/react 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @chainloyalty/react - Leaderboard Page
3
+ *
4
+ * A full-page wrapper for the Leaderboard component.
5
+ * Use this in your app's routing to display the leaderboard on a dedicated page.
6
+ *
7
+ * Example usage in your app's router:
8
+ * ```tsx
9
+ * import { LeaderboardPage } from '@chainloyalty/react';
10
+ *
11
+ * // Add to your routes
12
+ * { path: '/leaderboard', element: <LeaderboardPage walletAddress={userWallet} /> }
13
+ * ```
14
+ */
15
+
16
+ import React from 'react';
17
+ import { Leaderboard, type LeaderboardProps } from '../Leaderboard.js';
18
+
19
+ export const LeaderboardPage: React.FC<LeaderboardProps> = (props) => {
20
+ return (
21
+ <div className="min-h-screen" style={{ backgroundColor: 'hsl(var(--background))' }}>
22
+ {/* Header */}
23
+ <div className="border-b" style={{ borderColor: 'hsl(var(--border))' }}>
24
+ <div className="container mx-auto px-4 py-6">
25
+ <h1 className="text-3xl font-bold" style={{ color: 'hsl(var(--foreground))' }}>
26
+ Leaderboard
27
+ </h1>
28
+ <p className="text-sm mt-1" style={{ color: 'hsl(var(--muted-foreground))' }}>
29
+ See how you rank against other community members
30
+ </p>
31
+ </div>
32
+ </div>
33
+
34
+ {/* Content */}
35
+ <div className="container mx-auto px-4 py-8">
36
+ <div className="max-w-6xl mx-auto">
37
+ <Leaderboard {...props} />
38
+ </div>
39
+ </div>
40
+ </div>
41
+ );
42
+ };
43
+
44
+ export default LeaderboardPage;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @chainloyalty/react - RewardsDashboard Page
3
+ *
4
+ * A full-page wrapper for the RewardsDashboard component.
5
+ * Use this in your app's routing to display rewards on a dedicated page.
6
+ *
7
+ * Example usage in your app's router:
8
+ * ```tsx
9
+ * import { RewardsDashboardPage } from '@chainloyalty/react';
10
+ *
11
+ * // Add to your routes
12
+ * { path: '/rewards', element: <RewardsDashboardPage walletAddress={userWallet} /> }
13
+ * ```
14
+ */
15
+
16
+ import React from 'react';
17
+ import { RewardsDashboard, type RewardsDashboardProps } from '../RewardsDashboard.js';
18
+
19
+ export const RewardsDashboardPage: React.FC<RewardsDashboardProps> = (props) => {
20
+ return (
21
+ <div className="min-h-screen" style={{ backgroundColor: 'hsl(var(--background))' }}>
22
+ {/* Header */}
23
+ <div className="border-b" style={{ borderColor: 'hsl(var(--border))' }}>
24
+ <div className="container mx-auto px-4 py-6">
25
+ <h1 className="text-3xl font-bold" style={{ color: 'hsl(var(--foreground))' }}>
26
+ Your Rewards
27
+ </h1>
28
+ <p className="text-sm mt-1" style={{ color: 'hsl(var(--muted-foreground))' }}>
29
+ Track your points, badges, achievements, and tier level
30
+ </p>
31
+ </div>
32
+ </div>
33
+
34
+ {/* Content */}
35
+ <div className="container mx-auto px-4 py-8">
36
+ <div className="max-w-4xl mx-auto">
37
+ <RewardsDashboard {...props} />
38
+ </div>
39
+ </div>
40
+ </div>
41
+ );
42
+ };
43
+
44
+ export default RewardsDashboardPage;