diff --git a/cypress/e2e/navigation.cy.ts b/cypress/e2e/navigation.cy.ts index 72fe681..54154c2 100644 --- a/cypress/e2e/navigation.cy.ts +++ b/cypress/e2e/navigation.cy.ts @@ -22,9 +22,9 @@ describe('Navigation tests', () => { cy.getByTestId('search-bar').find('input').type('324'); cy.getByTestId('chain-row').should('be.visible').click(); - cy.url().should('include', '/324'); cy.getByTestId('chain-id').should('be.visible').and('contain', '324'); + cy.url().should('include', '/324'); cy.getByTestId('home-breadcrumb').click(); cy.url().should('eq', 'http://localhost:5173/'); diff --git a/src/pages/[chain]/index.tsx b/src/pages/[chain]/index.tsx index 7fb2755..dc16fea 100644 --- a/src/pages/[chain]/index.tsx +++ b/src/pages/[chain]/index.tsx @@ -41,8 +41,18 @@ export const getStaticPaths: GetStaticPaths = async () => { }; } - const ecosystemData = await fetchEcosystemData(); - const chains = ecosystemData.zkChains; + let ecosystemData; + try { + ecosystemData = await fetchEcosystemData(); + } catch (error) { + console.error('Failed to fetch ecosystem data:', error); + return { + paths: [], + fallback: true, + }; + } + + const chains = ecosystemData.zkChains || []; const paths = SUPPORTED_LANGUAGES.flatMap((locale) => chains.map((chain: EcosystemChainData) => ({