fix(trading): redirect to markets all page if no market found (#3888)

This commit is contained in:
Matthew Russell 2023-05-22 22:02:55 -07:00 committed by GitHub
parent 5280b79927
commit 1699e33cbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -140,8 +140,8 @@ describe('home', { tags: '@regression' }, () => {
cy.wait('@MarketsData'); cy.wait('@MarketsData');
}); });
it('redirects to a the empty market page and displays welcome notice', () => { it('redirects to market/all and displays welcome notice', () => {
cy.url().should('eq', Cypress.config().baseUrl + `/#/markets`); cy.url().should('eq', Cypress.config().baseUrl + `/#/markets/all`);
cy.getByTestId('welcome-notice-title').should( cy.getByTestId('welcome-notice-title').should(
'contain.text', 'contain.text',
'Welcome to Console' 'Welcome to Console'

View File

@ -30,7 +30,7 @@ export const Home = () => {
replace: true, replace: true,
}); });
} else { } else {
navigate(Links[Routes.MARKET]()); navigate(Links[Routes.MARKETS]());
} }
} }
}, [marketId, data, navigate, update]); }, [marketId, data, navigate, update]);