|
1 | 1 | import React from "react" |
2 | 2 | import Image from "next/image" |
3 | 3 | import graduateLogo from "@/public/images/dashboard/graduate.png" |
4 | | -import { Stack, Typography, styled, theme } from "ol-components" |
| 4 | +import { Stack, Typography, styled, theme, Link } from "ol-components" |
5 | 5 | import { useQuery } from "@tanstack/react-query" |
6 | 6 | import { DashboardCardRoot } from "./DashboardCard" |
7 | 7 | import { mitxUserQueries } from "api/mitxonline-hooks/user" |
@@ -55,12 +55,17 @@ const CardRootStyled = styled(DashboardCardRoot)({ |
55 | 55 | }, |
56 | 56 | }) |
57 | 57 |
|
| 58 | +const TitleLink = styled(Link)({ |
| 59 | + width: "100%", |
| 60 | +}) |
| 61 | + |
58 | 62 | const CardContent = styled(Stack)({ |
59 | 63 | display: "flex", |
60 | 64 | justifyContent: "space-between", |
61 | 65 | alignItems: "center", |
62 | 66 | padding: "16px", |
63 | 67 | width: "100%", |
| 68 | + gap: "16px", |
64 | 69 | "&:not(:last-child)": { |
65 | 70 | borderBottom: `1px solid ${theme.custom.colors.lightGray2}`, |
66 | 71 | }, |
@@ -90,19 +95,20 @@ interface OrganizationContractsProps { |
90 | 95 | const OrganizationContracts: React.FC<OrganizationContractsProps> = ({ |
91 | 96 | org, |
92 | 97 | }) => { |
93 | | - const contractContent = org.contracts?.length |
94 | | - ? org.contracts?.map((contract) => ( |
| 98 | + const contractContent = |
| 99 | + org.contracts?.map((contract) => { |
| 100 | + const href = organizationView(org.slug.replace("org-", "")) |
| 101 | + return ( |
95 | 102 | <CardContent key={contract.id} direction="row"> |
96 | | - <Typography variant="subtitle2">{contract.name}</Typography> |
97 | | - <ButtonLink |
98 | | - size="small" |
99 | | - href={organizationView(org.slug.replace("org-", ""))} |
100 | | - > |
| 103 | + <TitleLink size="medium" color="black" href={href}> |
| 104 | + {contract.name} |
| 105 | + </TitleLink> |
| 106 | + <ButtonLink size="small" href={href}> |
101 | 107 | Continue |
102 | 108 | </ButtonLink> |
103 | 109 | </CardContent> |
104 | | - )) |
105 | | - : null |
| 110 | + ) |
| 111 | + }) ?? null |
106 | 112 | return ( |
107 | 113 | <ContractCard> |
108 | 114 | <Title key={org.id}> |
|
0 commit comments