Skip to content

Commit

Permalink
Merge pull request #17 from shivamg9/develop
Browse files Browse the repository at this point in the history
Modified button links in programs
  • Loading branch information
shibu-narayanan authored Mar 21, 2024
2 parents 2790925 + 81d4b66 commit 1d6d0b7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 34 deletions.
20 changes: 1 addition & 19 deletions src/app/[locale]/programs/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default function ProgrmPage({
router.push(`apply?programid=${program.id}`);
};
const handleViewClick = (program: Program) => {
router.push(`submission?programId=${program.id}`);
router.push(`view?programId=${program.id}`);
};
const handleReapplyClick = (program: Program) => {
router.push(`apply?programid=${program.id}`);
Expand All @@ -105,24 +105,20 @@ export default function ProgrmPage({
{program.is_portal_form_mapped &&
(program.is_multiple_form_submission ? (
showReapplyButton ? (
<Link href="#">
<button
className="applyButton buttonElement w-24 h-8 bg-blue-700 rounded-md text-white text-xs font-normal flex items-center justify-center"
onClick={() => handleReapplyClick(program)}
>
{t("Reapply")}
</button>
</Link>
) : null
) : (
<Link href="#">
<button
className="viewButton buttonElement w-24 h-8 bg-blue-700 rounded-md text-blue text-xs font-normal flex items-center justify-center"
onClick={() => handleViewClick(program)}
>
{t("View")}
</button>
</Link>
))}
</td>
</>
Expand All @@ -134,33 +130,27 @@ export default function ProgrmPage({
{program.is_portal_form_mapped &&
(program.is_multiple_form_submission ? (
showReapplyButton ? (
<Link href="#">
<button
className="applyButton w-24 h-8 bg-blue-700 rounded-md text-white text-xs font-normal flex items-center justify-center"
onClick={() => handleReapplyClick(program)}
>
{t("Reapply")}
</button>
</Link>
) : (
<Link href="#">
<button
className="applyButton w-24 h-8 bg-blue-700 rounded-md text-white text-xs font-normal flex items-center justify-center"
onClick={() => handleApplyClick(program)}
>
{t("Apply")}
</button>
</Link>
)
) : (
<Link href="#">
<button
className="viewButton w-24 h-8 bg-blue-700 rounded-md text-blue text-xs font-normal flex items-center justify-center"
onClick={() => handleViewClick(program)}
>
{t("View")}
</button>
</Link>
))}
</td>
</>
Expand All @@ -172,24 +162,20 @@ export default function ProgrmPage({
{program.is_portal_form_mapped &&
(program.is_multiple_form_submission ? (
showReapplyButton ? (
<Link href="#">
<button
className="applyButton w-24 h-8 bg-blue-700 rounded-md text-white text-xs font-normal flex items-center justify-center"
onClick={() => handleReapplyClick(program)}
>
{t("Reapply")}
</button>
</Link>
) : null
) : (
<Link href="#">
<button
className="viewButton w-24 h-8 bg-blue-700 rounded-md text-blue text-xs font-normal flex items-center justify-center"
onClick={() => handleViewClick(program)}
>
{t("View")}
</button>
</Link>
))}
</td>
</>
Expand All @@ -198,14 +184,12 @@ export default function ProgrmPage({
return (
<>
<td>
<Link href="#">
<button
className="viewButton w-24 h-8 bg-blue-700 rounded-md text-blue text-xs font-normal flex items-center justify-center"
onClick={() => handleViewClick(program)}
>
{t("View")}
</button>
</Link>
</td>
</>
);
Expand All @@ -217,14 +201,12 @@ export default function ProgrmPage({
<>
<td>
{program.is_portal_form_mapped && (
<Link href="#">
<button
className="applyButton w-24 h-8 bg-blue-700 rounded-md text-white text-xs font-normal flex items-center justify-center"
onClick={() => handleApplyClick(program)}
>
{t("Apply")}
</button>
</Link>
)}
</td>
</>
Expand Down
30 changes: 18 additions & 12 deletions src/components/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,18 @@ export function CardItem({
return (
<div className="flex flex-col w-full bg-brand border border-gray-200 square-lg shadow dark:bg-brand rounded-lg">
<div className="flex items-center justify-between pt-4 pl-4 mb-2 ">
<h5 className="font-fontcustom m-4 "
style={{
font: "normal normal 600 16px/20px Inter",
letterSpacing: "0px",
color: "#484848",
opacity: "1",
whiteSpace: "nowrap",
}}
>
{title}</h5>
<h5
className="font-fontcustom m-4 "
style={{
font: "normal normal 600 16px/20px Inter",
letterSpacing: "0px",
color: "#484848",
opacity: "1",
whiteSpace: "nowrap",
}}
>
{title}
</h5>
</div>
<hr className="border-t mx-0 border-gray-200 " />
<div className="flow-root">
Expand All @@ -100,7 +102,9 @@ export function CardItem({
<Link href={link1} className="text-sm font-medium text-gray-100 truncate columnElement">
{heading1}
</Link>
<p className="text-sm text-gray-600 truncate dark:text-gray-400 columnElement">{description1}</p>
<p className="text-sm text-gray-600 truncate dark:text-gray-400 columnElement">
{description1}
</p>
</div>
</div>
</li>
Expand All @@ -123,7 +127,9 @@ export function CardItem({
<Link href={link2} className="text-sm font-medium text-gray-100 truncate columnElement">
{heading2}
</Link>
<p className="text-sm text-gray-600 truncate dark:text-gray-400 columnElement">{description2}</p>
<p className="text-sm text-gray-600 truncate dark:text-gray-400 columnElement">
{description2}
</p>
</div>
</div>
</li>
Expand Down
1 change: 0 additions & 1 deletion src/components/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,3 @@ export default function Pagination({
</div>
);
}

6 changes: 4 additions & 2 deletions src/components/navigation/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ export default function Footer() {
color: "#484848",
opacity: "1",
whiteSpace: "nowrap",
}} >
}}
>
{t("Contact Us")}
</Link>
</li>
Expand All @@ -74,7 +75,8 @@ export default function Footer() {
color: "#484848",
opacity: "1",
whiteSpace: "nowrap",
}} >
}}
>
{t("Others")}
</Link>
</li>
Expand Down

0 comments on commit 1d6d0b7

Please sign in to comment.