mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-02-13 21:33:20 +01:00
Fix announcements not closing when button is pressed
This commit is contained in:
parent
87630c87a6
commit
61d77bf20e
1 changed files with 4 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
import { Controller } from '@hotwired/stimulus';
|
||||
import { Alert } from 'bootstrap';
|
||||
|
||||
export default class extends Controller {
|
||||
static values = {
|
||||
|
@ -15,5 +16,8 @@ export default class extends Controller {
|
|||
|
||||
close(): void {
|
||||
window.localStorage.setItem(`announcement${this.idValue}`, 'true');
|
||||
|
||||
const alert = Alert.getOrCreateInstance(this.element);
|
||||
alert.close();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue