Skip to content

Commit

Permalink
Adiciona roteamento ao clicar no botão "Cadastrar pet" (devhatt#298)
Browse files Browse the repository at this point in the history
* feat: add router when click on button

* refactor: refactor button listen
  • Loading branch information
wendesongomes authored Aug 29, 2024
1 parent a20d5d9 commit bc4dc91
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/layouts/app/pages/NoPetRegirested/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component } from 'pet-dex-utilities';
import { Router } from 'vanilla-routing';
import Button from '../../../../components/Button';
import petUrl from './images/no-pet-regirested-page.png';
import './index.scss';
Expand Down Expand Up @@ -30,6 +31,10 @@ export default function NoPetRegirested() {
.get('button')
.classList.add('no-pet-regirested-page__button');
this.button.mount($container);

this.button.listen('click', () => {
Router.go('/add/addpets');
});
}

NoPetRegirested.prototype = Object.assign(
Expand Down

0 comments on commit bc4dc91

Please sign in to comment.