Skip to content

Commit bc0baf6

Browse files
committed
Refactor code: Update submission link format and enhance styling for submission cards in BountyDetails and Profile pages
1 parent 82547d1 commit bc0baf6

File tree

2 files changed

+33
-34
lines changed

2 files changed

+33
-34
lines changed

src/app/(pages)/bounty/[id]/page.tsx

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ const BountyDetails = () => {
116116
submissions.forEach((item: any) => {
117117
if (item.githubId == user.githubId) {
118118
setSubmissionLink(
119-
`https://octasol.io/${user.login}/submissions/${item.id}`
119+
`https://octasol.io/profile/${user.login}/submission/${item.id}`
120120
);
121121
setSubmitted(true);
122122
console.log(item);
@@ -265,20 +265,21 @@ const BountyDetails = () => {
265265
</div>
266266

267267
{submissionLink && (
268-
<div className="w-full h-min flex flex-col items-start py-5 px-4 md:px-8 gap-4 bg-[#0f0f0f] rounded-xl my-4">
269-
<div
270-
onClick={() => {
271-
handleConnect(submissionLink);
272-
}}
273-
className="flex justify-center items-center gap-8 cursor-pointer"
274-
>
275-
<Copy />
276-
<span className="text-sm md:text-base">
277-
Copy Submission Link
278-
</span>
279-
</div>
280-
</div>
281-
)}
268+
<div className="w-full h-min flex flex-col items-start py-5 px-4 md:px-8 gap-4 bg-[#0f0f0f] rounded-xl my-4">
269+
<div
270+
onClick={() => {
271+
handleConnect(submissionLink);
272+
}}
273+
className="flex justify-center items-center gap-8 cursor-pointer group"
274+
>
275+
<Copy className="text-white group-hover:text-green-500 transition-colors duration-200" />
276+
<span className="text-sm md:text-base text-white group-hover:text-green-500 transition-colors duration-200">
277+
Copy Submission Link
278+
</span>
279+
</div>
280+
</div>
281+
)}
282+
282283
{/* <div className="rotate-0 md:rotate-180 h-[1px] md:h-[85vh] w-full md:w-px block">
283284
<div className="w-full h-full bg-gradient-to-r md:bg-gradient-to-b from-transparent via-[#46bf96] to-transparent"></div>
284285
</div> */}

src/app/(pages)/profile/[username]/page.tsx

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -354,16 +354,21 @@ export default function BentoGridDemo() {
354354
{userSubmissions.map((submission, index) => (
355355
<Card
356356
key={index}
357-
className="relative group rounded-2xl shadow-sm p-8 transition-all duration-500 ease-in-out transform hover:-translate-y-1 cursor-pointer bg-black shadow-[#43aa8a]"
357+
className="relative group rounded-2xl shadow-sm p-5 md:p-8 transition-all duration-500 ease-in-out transform hover:-translate-y-1 cursor-pointer bg-black shadow-[#43aa8a]"
358358
onClick={() => {
359359
router.push(
360360
`/profile/${user.login}/submission/${submission.id}`
361361
);
362362
}}
363363
>
364-
{submission?.bounty?.sponsor?.image && (
364+
365+
366+
<div className="mt-4 w-full flex flex-col md:flex-row justify-between items-center gap-5">
367+
<div className=" flex flex-col gap-2 w-full md:w-9/12">
368+
<div className="flex items-center justify-between w-full gap-2">
369+
{submission?.bounty?.sponsor?.image && (
365370
<div
366-
className={`absolute -top-8 left-6 rounded-xl p-3 shadow-lg group-hover:scale-110 transition-transform duration-300`}
371+
className={`rounded-xl p-3 shadow-lg group-hover:scale-110 transition-transform duration-300`}
367372
>
368373
<Image
369374
src={submission.bounty.sponsor.image}
@@ -373,38 +378,31 @@ export default function BentoGridDemo() {
373378
></Image>
374379
</div>
375380
)}
376-
377-
<div className="mt-4 w-full flex justify-between items-center">
378-
<div className=" flex flex-col gap-2 w-9/12">
379-
<h2 className="text-xl font-bold">
381+
<h2 className="text-base md:text-xl font-bold w-full">
380382
{submission.bounty.bountyname}
381383
</h2>
382384
<div>
383-
<p className="font-semibold text-sm">
384-
{submission?.bounty?.sponsor?.name}
385-
</p>
386-
<p className="text-xs text-muted-foreground">
387-
Sponsor
388-
</p>
385+
</div>
389386
</div>
387+
390388
</div>
391-
<div className="flex flex-col items-end gap-2">
389+
<div className="flex flex-row md:flex-col justify-between w-full items-center md:items-end gap-2 px-4">
392390
<div className="flex items-center ">
393391
<DollarSign className="h-4 w-4 text-green-500" />
394392
<span className="font-bold">
395393
{submission.bounty.price}
396394
</span>
397395
</div>
398-
<div className="flex items-center gap-2">
399-
<ShieldCheck className="h-4 w-4 text-green-500" />
400-
<span className="font-bold">
396+
{/* <div className="flex items-center gap-2"> */}
397+
{/* <ShieldCheck className="h-4 w-4 text-green-500" /> */}
398+
{/* <span className="font-bold">
401399
{submission.status === 0
402400
? "In Review"
403401
: submission.status === 1
404402
? "Approved"
405403
: "Rejected"}
406-
</span>
407-
</div>
404+
</span> */}
405+
{/* </div> */}
408406
<div className="flex items-center space-x-2 text-sm text-muted-foreground">
409407
<Calendar className="h-4 w-4" />
410408
<span>

0 commit comments

Comments
 (0)