Skip to content

Commit

Permalink
fix: short correction
Browse files Browse the repository at this point in the history
  • Loading branch information
Franqsanz committed Aug 28, 2024
1 parent d9c9a11 commit 551fbfc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"@typescript-eslint/adjacent-overload-signatures": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-unnecessary-condition": 0,
"@typescript-eslint/no-namespace": 0,
"react/no-unescaped-entities": 0,
"react-hooks/exhaustive-deps": 0
}
Expand Down
17 changes: 17 additions & 0 deletions cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@

// Import commands.js using ES2015 syntax:
import './commands';
import { mount } from 'cypress/react18';
import { ChakraProvider } from '@chakra-ui/react';
import theme from '../../theme';
import { createElement } from 'react';

declare global {
namespace Cypress {
interface Chainable {
mount: typeof mount;
}
}
}

Cypress.Commands.add('mount', (component, options) => {
const wrappedComponent = createElement(ChakraProvider, { theme }, component);

return mount(wrappedComponent, options);
});
// Alternatively you can use CommonJS syntax:
// require('./commands')
2 changes: 1 addition & 1 deletion src/pages/Book.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default function Book() {
bxSize: 5,
});

return navigate('/explore', { replace: true });
navigate('/explore', { replace: true });
}

function handleDeleteBook() {
Expand Down

0 comments on commit 551fbfc

Please sign in to comment.