Skip to content

Commit

Permalink
fix: grant detail overview loading grant info
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanoshadjipetrou committed Jul 27, 2023
1 parent fb747ad commit 1b58f11
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { PageLoader } from "app/modules/common/page-loader";
import { ratingValues } from "app/components/Charts/PerformanceRating/data";
import { InvestmentRadialViz } from "app/modules/grant-detail-module/components/radial";

export function GrantDetailOverviewModule(props: { period: string }) {
export function GrantDetailOverviewModule() {
const cmsData = useCMSData({ returnData: true });

const isLoading = useStoreState((state) => state.GrantDetailInfo.loading);
Expand Down Expand Up @@ -335,35 +335,37 @@ export function GrantDetailOverviewModule(props: { period: string }) {
))}
</div>
</div>
<div
css={`
padding-left: 20px;
width: 95%;
`}
>
<p
css={`
color: #000;
font-family: "Gotham Narrow", sans-serif;
margin-top: 0;
margin-bottom: 0;
`}
>
<b>Principal Recipient:</b>
</p>
<Link
{grantInfoData.principalRecipient && (
<div
css={`
color: #000;
font-size: 12px;
cursor: pointer;
text-decoration: underline;
width: 95%;
padding-left: 20px;
`}
to={`/partner/${grantInfoData.principalRecipient.code}/investments`}
>
{grantInfoData.principalRecipient.name} (
{grantInfoData.principalRecipient.shortName})
</Link>
</div>
<p
css={`
color: #000;
font-family: "Gotham Narrow", sans-serif;
margin-top: 0;
margin-bottom: 0;
`}
>
<b>Principal Recipient:</b>
</p>
<Link
css={`
color: #000;
font-size: 12px;
cursor: pointer;
text-decoration: underline;
`}
to={`/partner/${grantInfoData.principalRecipient.code}/investments`}
>
{grantInfoData.principalRecipient.name} (
{grantInfoData.principalRecipient.shortName})
</Link>
</div>
)}
</Grid>
<Grid
item
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/grant-detail-module/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export default function GrantDetail() {
<Switch>
{/* Overview */}
<Route path={`/grant/${params.code}/${params.period}/overview`}>
<GrantDetailOverviewModule period={params.period} />
<GrantDetailOverviewModule />
</Route>
{/* Budgets */}
<Route path={`/grant/${params.code}/${params.period}/budgets/flow`}>
Expand Down

0 comments on commit 1b58f11

Please sign in to comment.