Skip to content

Commit 55c4b24

Browse files
committed
feat: simplify loading state display and optimize skeleton screen rendering in LearningProgressSection
1 parent b9e03d4 commit 55c4b24

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/components/dashboard/LearningProgressSection.jsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,6 @@ const LearningProgressSection = ({ user }) => {
221221
<div className="bg-white rounded-2xl border border-gray-100 p-4">
222222
<div className="text-center">
223223
<h3 className="text-lg font-medium text-gray-900">{loadingMessage}</h3>
224-
{!loading && totalLeaguesForCalculation > 0 && (
225-
<p className="text-sm text-gray-600 mt-1">
226-
Progress: {completedResourceCalculations.size}/{totalLeaguesForCalculation} leagues
227-
</p>
228-
)}
229224
</div>
230225
</div>
231226

@@ -253,11 +248,11 @@ const LearningProgressSection = ({ user }) => {
253248
<div className="bg-white rounded-2xl border border-gray-100 p-6">
254249
<div className="h-6 bg-gray-200 rounded w-1/3 mb-6 animate-pulse"></div>
255250
<div className="space-y-4">
256-
{[1, 2, 3].map(i => (
251+
{[1].map(i => (
257252
<div key={i} className="border border-gray-100 rounded-xl p-6">
258253
<div className="h-5 bg-gray-200 rounded w-1/4 mb-4 animate-pulse"></div>
259254
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
260-
{[1, 2].map(j => (
255+
{[1, 2, 3].map(j => (
261256
<div key={j} className="p-4 bg-gray-50 rounded-lg">
262257
<div className="h-4 bg-gray-200 rounded w-3/4 mb-2 animate-pulse"></div>
263258
<div className="h-3 bg-gray-200 rounded w-full mb-3 animate-pulse"></div>

0 commit comments

Comments
 (0)