Skip to content

Commit

Permalink
fix(report): simpler page detection (#307)
Browse files Browse the repository at this point in the history
  • Loading branch information
revolunet authored Feb 28, 2024
1 parent bd8dbb0 commit f65177a
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 153 deletions.
44 changes: 24 additions & 20 deletions report/www/pages/summary/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,18 @@ const summaryConfigs: Record<string, SummaryConfig> = {
renderCell: (params) => {
if (params.value === "A") {
return (
<Link
prefetch={false}
title={`Voir la page de stats de l'url ${slugifyUrl(
params.row.url
)}`}
href={params.row.stats.url + "/" + params.row.stats.uri}
target="_blank"
>
{params.row.stats.uri}
</Link>
params.row.betagouv && (
<Link
prefetch={false}
title={`Voir la page de stats de l'url ${slugifyUrl(
params.row.url
)}`}
href={params.row.stats.url + "/" + params.row.stats.uri}
target="_blank"
>
{params.row.betagouv.attributes.stats_url}
</Link>
)
);
}
return <GradeBadge showWarningOnError label="F" />;
Expand All @@ -155,16 +157,18 @@ const summaryConfigs: Record<string, SummaryConfig> = {
renderCell: (params) => {
if (params.value === "A") {
return (
<Link
prefetch={false}
title={`Voir la page de budget de l'url ${slugifyUrl(
params.row.url
)}`}
href={params.row.budget.url + "/" + params.row.budget.uri}
target="_blank"
>
/{params.row.budget.uri}
</Link>
params.row.betagouv && (
<Link
prefetch={false}
title={`Voir la page de budget de l'url ${slugifyUrl(
params.row.url
)}`}
href={params.row.budget.url + "/" + params.row.budget.uri}
target="_blank"
>
/{params.row.betagouv.attributes.budget_url}
</Link>
)
);
}
return <GradeBadge showWarningOnError label="F" />;
Expand Down
Loading

0 comments on commit f65177a

Please sign in to comment.