Friday, September 20, 2024 1:41:24 AM
> settings

Customize


Authenticate

> notifications_controller.js
import { Controller } from "@hotwired/stimulus"
import moment from "moment"

// Connects to data-controller="notifications"
export default class extends Controller {
  static targets = ["toast"]

  connect() {
    setTimeout((toast) => {
      toast.hide();
    }, 7000, new bootstrap.Toast(this.toastTarget));
  }
}
All opinions represented herein are my own
- © 2024 itsthedevman
- build 340fbb8