Skip to content

Commit 480702b

Browse files
committed
Progress in points and in scholarship
1 parent de09bab commit 480702b

File tree

11 files changed

+336
-307
lines changed

11 files changed

+336
-307
lines changed

apps/nextjs/app/[lang]/[pathPrefix]/[pathSuffix]/page.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
'use client'
22

3-
import { use, useEffect, useState, useCallback } from 'react'
4-
import Link from 'next/link'
5-
import { useAccount } from 'wagmi'
6-
import { useSession } from 'next-auth/react'
73
import axios from 'axios'
8-
9-
import { useGuideData } from '@/lib/hooks/useGuideData'
10-
import { remarkFillInTheBlank } from '@/lib/remarkFillInTheBlank.mjs'
11-
12-
import { Button } from '@/components/ui/button'
13-
import GoodDollarClaimButton from '@/components/GoodDollarClaimButton'
14-
import { unified } from 'unified'
4+
import { useSession } from 'next-auth/react'
5+
import Link from 'next/link'
6+
import { use, useEffect, useState, useCallback } from 'react'
157
import remarkParse from 'remark-parse'
168
import remarkGfm from 'remark-gfm'
179
import remarkDirective from 'remark-directive'
1810
import remarkFrontmatter from 'remark-frontmatter'
1911
import remarkRehype from 'remark-rehype'
2012
import rehypeStringify from 'rehype-stringify'
13+
import { unified } from 'unified'
14+
import { useAccount } from 'wagmi'
15+
16+
import GoodDollarClaimButton from '@/components/GoodDollarClaimButton'
17+
import { Button } from '@/components/ui/button'
18+
import { useGuideData } from '@/lib/hooks/useGuideData'
19+
import { remarkFillInTheBlank } from '@/lib/remarkFillInTheBlank.mjs'
2120

2221
type PageProps = {
2322
params: Promise<{

apps/nextjs/app/[lang]/[pathPrefix]/page.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { useAccount } from 'wagmi'
66

77
import { useGuideData } from '@/lib/hooks/useGuideData'
88

9-
import { Button } from '@/components/ui/button'
109
import { CompletedProgress } from '@/components/ui/completed-progress'
1110
import remarkDirective from 'remark-directive'
1211
import remarkFrontmatter from 'remark-frontmatter'
@@ -30,7 +29,7 @@ export default function Page({ params }: PageProps) {
3029
const parameters = use(params)
3130
const { lang, pathPrefix } = parameters
3231

33-
const { course, loading, error, percentageCompleted, amountScholarship } = useGuideData({
32+
const { course, loading, error, percentageCompleted, percentagePaid, amountScholarship } = useGuideData({
3433
lang,
3534
pathPrefix,
3635
})
@@ -111,7 +110,7 @@ export default function Page({ params }: PageProps) {
111110
{course.subtitulo}
112111
</h2>
113112
<div className="mt-4 flex items-center justify-center gap-6">
114-
<CompletedProgress progress={percentageCompleted || 0} lang={lang} />
113+
<CompletedProgress percentageCompleted={percentageCompleted || 0} percentagePaid={percentagePaid || 0} lang={lang} />
115114
<div className="flex flex-col gap-1">
116115
<div className="text-sm text-gray-600">
117116
{lang === 'es' ? 'Total de guias en el curso: ' : 'Total of guides in course: '}

0 commit comments

Comments
 (0)