diff --git a/app/javascript/application.js b/app/javascript/application.js index 7c48bbd..65e1c18 100644 --- a/app/javascript/application.js +++ b/app/javascript/application.js @@ -1,6 +1,16 @@ // Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails import "@hotwired/turbo-rails" import "controllers" +import { Notyf } from 'notyf' + +window.buildNotyf = ()=>{ + const notyf=new Notyf({ + duration: 5000, + position: { x: 'center', y: 'top' }, + }) + return notyf +} // Customize Turbo default behaviour -Turbo.setProgressBarDelay(300) \ No newline at end of file +Turbo.setProgressBarDelay(300) +// Turbo.session.drive = false \ No newline at end of file diff --git a/app/views/layouts/_notification.html.erb b/app/views/layouts/_notification.html.erb index 80feae8..d5db2e7 100644 --- a/app/views/layouts/_notification.html.erb +++ b/app/views/layouts/_notification.html.erb @@ -1,27 +1,13 @@