Skip to content

Commit 4ae71ea

Browse files
authored
Merge pull request #202 from ctfguide-tech/feat/HeroChanges
Feat/hero changes
2 parents 662a9a6 + c582fb5 commit 4ae71ea

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

src/components/home/Hero.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function Hero() {
2626
{ userName: 'laphatize', challengeName: 'Excel-lently Hidden', profilePic: 'https://imagedelivery.net/1Dym4oPRvM_5USnDWCdSCw/7523c0cb-2330-443c-94f1-030cd8bde300/public' },
2727
{ userName: 'herronjo', challengeName: 'Trading Bananas' , profilePic: 'https://imagedelivery.net/1Dym4oPRvM_5USnDWCdSCw/1bd03d05-1057-48fc-3d3f-b3ed512cb500/public' },
2828
{ userName: 'thunderbird', challengeName: 'Sneaky Cat ' , profilePic: 'https://imagedelivery.net/1Dym4oPRvM_5USnDWCdSCw/3b312b5f-c90d-490d-80d0-e52b367d4400/public' },
29-
{ userName: 'steven', challengeName: 'Pretty Obvious', profilePic: 'https://imagedelivery.net/1Dym4oPRvM_5USnDWCdSCw/3e75c7a3-dfe9-47cc-0d46-736187e62400/public' },
29+
{ userName: 'stevestef', challengeName: 'Pretty Obvious', profilePic: 'https://imagedelivery.net/1Dym4oPRvM_5USnDWCdSCw/3e75c7a3-dfe9-47cc-0d46-736187e62400/public' },
3030
]);
3131
};
3232

src/pages/create.jsx

+23
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,31 @@ export default function Create() {
437437
>
438438
<i className="fas fa-comments mr-1"></i> View Feedback
439439
</button>
440+
441+
<a className='ml-4 text-red-600 hover:text-red-700 cursor-pointer' onClick={() => window.open(`../../challenges/${challenge.id}`, '_blank')}>
442+
<i className="fas fa-external-link-alt mr-2"></i>
443+
Go to Challenge Page
444+
</a>
440445
</>
441446
)}
447+
{challenge.state === 'STANDARD_UNVERIFIED' &&(
448+
<>
449+
<a href={`/create/edit?id=${challenge.id}`} className="text-blue-600 hover:text-blue-500">
450+
<i className="fas fa-pencil-alt mr-1"></i> Edit<span className="sr-only">, {challenge.title}</span>
451+
</a>
452+
453+
<a className='ml-4 text-red-600 hover:text-red-700 cursor-pointer' onClick={() => window.open(`../../challenges/${challenge.id}`, '_blank')}>
454+
<i className="fas fa-external-link-alt mr-2"></i>
455+
Go to Challenge Page
456+
</a>
457+
</>
458+
)}
459+
{challenge.state === 'STANDARD_VERIFIED' &&(
460+
<a className='ml-4 text-red-600 hover:text-red-700 cursor-pointer' onClick={() => window.open(`../../challenges/${challenge.id}`, '_blank')}>
461+
<i className="fas fa-external-link-alt mr-2"></i>
462+
Go to Challenge Page
463+
</a>
464+
)}
442465

443466
</td>
444467

src/pages/dashboard.jsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -257,20 +257,21 @@ export default function Dashboard() {
257257
</h1>
258258
<ul className='flex flex-col gap-4 [&>*]:line-clamp-2'>
259259

260-
{activities && activities.length > 0 ?
260+
{activities && activities.length > 0 ?
261261
activities.slice().reverse().map((data) =>
262262
<div className="text-lg">
263263
<li>
264264
<a className='text-blue-500 hover:text-blue-600 cursor-pointer font-bold' href={"../users/" + data.userName}>{data.userName}</a> completed
265265
<a className='text-yellow-500 hover:text-yellow-600 cursor-pointer' href={"../challenges/" + data.challengeId}> {data.challengeName}</a>
266266
</li>
267-
</div>
267+
</div>
268268
) :
269269
<>
270270
<Skeleton containerClassName='col-span-2' className='mb-4' baseColor='#262626' highlightColor='#3a3a3a' count={2} />
271271
</>
272272
}
273273

274+
274275

275276
</ul>
276277
</div>

0 commit comments

Comments
 (0)