Skip to content

Commit

Permalink
Fixed OG metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-vasconcelos committed Jan 8, 2024
1 parent 40be5e8 commit b08a08f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nextjs/app/[locale]/(frontend)/lines/[line_id]/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export async function generateMetadata({ params }) {
const lineData = await fetch(params.line_id?.length && `https://api.carrismetropolitana.pt/lines/${params.line_id}`).then((res) => res.json());

// B. Render the titles
if (params.line_id === 'all' || !lineData.name) {
if (params.line_id === 'all' || !lineData.short_name || !!lineData.long_name) {
switch (params.locale) {
case 'pt':
return { title: 'Todas as Linhas', description: 'Conheça as linhas e horários da Carris Metropolitana' };
Expand Down

0 comments on commit b08a08f

Please sign in to comment.