Skip to content

Commit 18b0da1

Browse files
authored
[Chore] Fix rendering bug on plans page (#24304)
* [Chore] Fix rendering bug on plans page * unused import
1 parent ce39095 commit 18b0da1

File tree

2 files changed

+3
-28
lines changed

2 files changed

+3
-28
lines changed

src/components/FeatureTable.astro

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import { z } from "astro:schema";
33
import { indexPlans } from "~/util/plans";
44
import { marked } from "marked";
5-
import GlossaryTooltip from "~/components/GlossaryTooltip.astro";
65
76
type Props = z.infer<typeof props>;
87
@@ -46,33 +45,9 @@ const markdown = (content: any) => {
4645
<tbody>
4746
{
4847
features.map((feature) => {
49-
const renderTitle = (title: string) => {
50-
const placeholder = "[[GLOSSARY_TOOLTIP_SNIPPETS_SUBREQUEST]]";
51-
52-
if (title.includes(placeholder)) {
53-
const [beforePlaceholder, afterPlaceholder] =
54-
title.split(placeholder);
55-
56-
return (
57-
<>
58-
{beforePlaceholder}
59-
<GlossaryTooltip
60-
term="Snippets subrequest"
61-
prepend="A subrequest is "
62-
>
63-
subrequests
64-
</GlossaryTooltip>
65-
{afterPlaceholder}
66-
</>
67-
);
68-
}
69-
70-
return markdown(title);
71-
};
72-
7348
return (
7449
<tr>
75-
<th set:html={renderTitle(feature.title)} />
50+
<th set:html={markdown(feature.title)} />
7651
{hasFree && <td set:html={markdown(feature.free)} />}
7752
{hasPro && <td set:html={markdown(feature.pro)} />}
7853
{hasBiz && <td set:html={markdown(feature.biz)} />}

src/content/plans/index.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,7 @@
13681368
"ent": 300
13691369
},
13701370
"subrequests": {
1371-
"title": "Number of [[GLOSSARY_TOOLTIP_SNIPPETS_SUBREQUEST]]",
1371+
"title": "Number of snippet subrequests",
13721372
"free": 0,
13731373
"pro": 2,
13741374
"biz": 3,
@@ -2785,7 +2785,7 @@
27852785
"pro": "No",
27862786
"biz": "No",
27872787
"ent": "Contact your account team"
2788-
},
2788+
},
27892789
"custom_certificates": {
27902790
"title": "[Custom certificates](/cloudflare-for-platforms/cloudflare-for-saas/security/certificate-management/custom-certificates/)",
27912791
"free": "No",

0 commit comments

Comments
 (0)