diff --git a/src/components/ProgressBarSection.tsx b/src/components/ProgressBarSection.tsx new file mode 100644 index 0000000..4dc2804 --- /dev/null +++ b/src/components/ProgressBarSection.tsx @@ -0,0 +1,38 @@ +import React from 'react'; +import { Container } from './Container'; + +const QUESTION_COUNT_LIMIT = 10; + +export function ProgressBarSection() { + const approvedQuestionCount = 3; + + const progressBarPercentage = Math.floor((approvedQuestionCount / QUESTION_COUNT_LIMIT) * 100); + + return ( + +

Next milestone

+
+ +
+ {approvedQuestionCount} +
+
+ / {QUESTION_COUNT_LIMIT} + approved questions +
+
+
approved questions
+
+ + {progressBarPercentage}% + +
+

+ Unlock: you'll get access to all approved questions once your question has been approved. +

+
+ ); +} diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 5d3aae0..667f9fa 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,5 +1,6 @@ import { PageProps } from '@/lib/types'; import Head from 'next/head'; +import { ProgressBarSection } from '@/components/ProgressBarSection'; import { CallToAction } from '../components/CallToAction'; import { CallToAction2 } from '../components/CallToAction2'; import { Features } from '../components/Features'; @@ -20,6 +21,7 @@ export default function Home({ session }: PageProps) { +