How to send to different page on confirming ion-alert

I am trying to go back to a different page when a user has confirmed the ion-alert that pops up. My Alert looks as follows:

  <ion-button @click="presentAlert">Find random opponent</ion-button>

import { IonButton, alertController } from '@ionic/vue';
import { defineComponent } from 'vue';

export default defineComponent({
  components: { IonButton },
  methods: {
    async presentAlert() {
      const alert = await alertController
          cssClass: 'my-custom-class',
          header: 'We are searching for a game. This may take a few minutes',
          buttons: ['OK'],
      return alert.present();

When the user clicks the “Ok” button I want to go to a different page than what the user is currently on. How is this done? I see the onDidDismiss in the ion-alert documentation, but I am not quite sure what to do here.

If you read the Documentation you can see that you can describe the buttons as objects with a text and a handler that is called on click. View Example: ion-alert - Ionic Documentation

For the future: Please read the Docs first, they will help you in 99% :smiley:

You’re completely right. I don’t know how I missed it, but it was just treating buttons as an array, defining the text for the button and defining the handler to use the router to push to another page.