1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-31 21:11:44 +02:00

Fix issue where share solution is shown without submitting

This commit is contained in:
Kamran Ahmed
2025-02-04 02:01:15 +00:00
parent 5cc4b834d1
commit e0da1e4f0e

View File

@@ -287,28 +287,32 @@ export function ProjectStepper(props: ProjectStepperProps) {
number={2}
/>
<span className="text-gray-600 sm:hidden">&middot;</span>
<button
className={cn(
'flex items-center gap-2 text-sm sm:hidden',
isCopied ? 'text-green-500' : 'text-gray-600',
)}
onClick={() => {
copyText(projectSolutionUrl);
}}
>
{isCopied ? (
<>
<CheckIcon additionalClasses="h-3 w-3" />
URL Copied
</>
) : (
<>
<Share className="h-3 w-3 stroke-[2.5px]" />
Share your Solution
</>
)}
</button>
{activeStep > 1 && (
<>
<span className="text-gray-600 sm:hidden">&middot;</span>
<button
className={cn(
'flex items-center gap-2 text-sm sm:hidden',
isCopied ? 'text-green-500' : 'text-gray-600',
)}
onClick={() => {
copyText(projectSolutionUrl);
}}
>
{isCopied ? (
<>
<CheckIcon additionalClasses="h-3 w-3" />
URL Copied
</>
) : (
<>
<Share className="h-3 w-3 stroke-[2.5px]" />
Share your Solution
</>
)}
</button>
</>
)}
</div>
<StepperStepSeparator isActive={activeStep > 1} />
<MilestoneStep