How to use router components with action sheet

Hello
I have a route for actions sheet:
{
path: ‘/comp/actions/:a/:b’,
actions: {
componentUrl: ‘/ajax_comps.php?link1={{a}}&id={{b}}’,
},
options: {
history: false,
browserHistory: false,
animate: animations,
},
},

And the file it returns looks like this:
<script>
export default (props, { $, $f7, $on }) => {

    $on('pageInit', () => {
      //- With callbacks on click
      var ac = $f7.actions.create({
        buttons: [
          {
            text: '<?php echo $wo["lang"]["forum"] ?>',
            onClick: function () {
              $f7.dialog.alert('Button1 clicked')
            }
          },
          {
            text: 'Button2',
            onClick: function () {
              $f7.dialog.alert('Button2 clicked')
            }
          },
          {
            text: 'Cancel',
            color: 'red',
            onClick: function () {
              $f7.dialog.alert('Cancel clicked')
            }
          },
        ]
      });
      ac.open();
    })

    return $render;
  }
</script>

It returns an error, what should I do?

Solved it,
the actions need to be like this:

  var ac = app.actions.create({

    forceToPopover: true,

    targetX: 500,

    targetY: 500,

    buttons: [

      {

        text: '<?php echo $_GET['id'] ?>',

        onClick: function () {

          $f7.dialog.alert('Button1 clicked')

        }

      },

      {

        text: 'Button2',

        onClick: function () {

          $f7.dialog.alert('Button2 clicked')

        }

      },

      {

        text: 'Cancel',

        color: 'red',

        onClick: function () {

          $f7.dialog.alert('Cancel clicked')

        }

      },

    ]

  });

  ac.open();

</script>