Skip to content

Commit d80a0ef

Browse files
committed
add spanish routes and fix links
1 parent 1de7aec commit d80a0ef

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

gatsby-node.js

+14
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ exports.createPages = async function({ actions, graphql }) {
99
component: require.resolve("./src/templates/city.js"),
1010
context: { slug: slug }
1111
});
12+
13+
const slugEs = "/es/eligibility/cities/" + city;
14+
actions.createPage({
15+
path: slugEs,
16+
component: require.resolve("./src/templates/city-es.js"),
17+
context: { slug: slugEs }
18+
});
1219
});
1320

1421
Object.keys(regulatedCounties).forEach(county => {
@@ -18,5 +25,12 @@ exports.createPages = async function({ actions, graphql }) {
1825
component: require.resolve("./src/templates/county.js"),
1926
context: { slug: slug }
2027
});
28+
29+
const slugEs = "/es/eligibility/counties/" + county;
30+
actions.createPage({
31+
path: slugEs,
32+
component: require.resolve("./src/templates/county-es.js"),
33+
context: { slug: slugEs }
34+
});
2135
});
2236
};

src/templates/city-es.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const City = () => {
2222
You can reach out to these great resources in {appCtx.town} to
2323
figure out if you are eligible.
2424
</p>
25-
<PrimaryButton to="/resources">
25+
<PrimaryButton to="/es/resources">
2626
Get help from a local tenants right group!
2727
</PrimaryButton>
2828

@@ -31,7 +31,7 @@ const City = () => {
3131
Think you may not be covered under rent control provisions in{" "}
3232
{appCtx.town}?
3333
</p>
34-
<PrimaryButton to="/eligibility/state/">
34+
<PrimaryButton to="/es/eligibility/state/">
3535
Check my status state-wide
3636
</PrimaryButton>
3737
</div>

src/templates/county-es.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ const County = () => {
1313
<p>Since {appCtx.county } county has some protections we want to figure out if you are eligible for those protections provided by { appCtx.county } county law. If those don't apply the state-wide protections in AB1482 may still apply to you.</p>
1414

1515
<p>You can reach out to these great resources in { appCtx.county } county to figure out if you are eligible.</p>
16-
<PrimaryButton to="/gethelp">Get help from a local tenants right group!</PrimaryButton>
16+
<PrimaryButton to="/es/gethelp">Get help from a local tenants right group!</PrimaryButton>
1717

1818

1919
<p><br />Do you get rent control in { appCtx.county } county?</p>
20-
<PrimaryButton to="/eligibility/state">No, help my check state-wide</PrimaryButton>
20+
<PrimaryButton to="/es/eligibility/state">No, help my check state-wide</PrimaryButton>
2121

2222
</div>
2323
)}

0 commit comments

Comments
 (0)