From eb1b8675b98987ad06eb93fd1390968d4dcafb63 Mon Sep 17 00:00:00 2001 From: austinkelsay Date: Sun, 22 Sep 2024 15:19:40 -0500 Subject: [PATCH] move purchases into settings, placeholder for progress data table on user profile --- .../charts/GithubContributionChart.js | 4 +- src/components/profile/UserProfile.js | 4 +- src/components/profile/UserSettings.js | 55 ++++++++++++++++--- .../profile/progress/UserProgress.js | 4 +- 4 files changed, 53 insertions(+), 14 deletions(-) diff --git a/src/components/charts/GithubContributionChart.js b/src/components/charts/GithubContributionChart.js index 11b1af4..d6ebf70 100644 --- a/src/components/charts/GithubContributionChart.js +++ b/src/components/charts/GithubContributionChart.js @@ -50,7 +50,7 @@ const GithubContributionChart = ({ username }) => { const calendar = generateCalendar(); return ( -
+
{(isLoading || isFetching) &&

Loading contribution data... ({totalCommits} commits fetched)

} {!isLoading && !isFetching &&
@@ -68,7 +68,7 @@ const GithubContributionChart = ({ username }) => { >
))}
-
+
Less
diff --git a/src/components/profile/UserProfile.js b/src/components/profile/UserProfile.js index b08d07d..e66f1f6 100644 --- a/src/components/profile/UserProfile.js +++ b/src/components/profile/UserProfile.js @@ -50,7 +50,7 @@ const UserProfile = () => { const header = (
- Purchases + Progress
); @@ -92,7 +92,7 @@ const UserProfile = () => {
) : ( { const PanelHeader = (options) => { return ( -
-

Relays

- +
+

Relays

+
); }; + const header = ( +
+ Purchases +
+ ); + return ( user && (
@@ -169,7 +181,7 @@ const UserSettings = () => { {nip19.npubEncode(user.pubkey)} -
+

Connect Your Lightning Wallet

@@ -180,7 +192,8 @@ const UserSettings = () => { {!session || !session?.user || !ndk ? (
) : ( - <> +
+
{ > url} header="Relay URL"> - - - + + +
+ + + { + console.log("rowData", rowData); + return + }} + header="Name" + > + item.courseId) ? "course" : "resource"} header="Category"> + formatDateTime(rowData?.createdAt)} header="Date"> + +
)}
) diff --git a/src/components/profile/progress/UserProgress.js b/src/components/profile/progress/UserProgress.js index 9b7bf84..4182e90 100644 --- a/src/components/profile/progress/UserProgress.js +++ b/src/components/profile/progress/UserProgress.js @@ -44,7 +44,7 @@ const UserProgress = () => { ]; return ( -
+

Your Dev Journey

Track your progress from Pleb to Plebdev

@@ -78,7 +78,7 @@ const UserProgress = () => { headerIcon: { className: 'hidden' }, }} header={ -
+
{index + 1}