Retrospring/app/javascript/retrospring/features/announcement/close.ts

5 lines
279 B
TypeScript
Raw Normal View History

export default function (event: Event): void {
const announcement = (event.target as HTMLElement).closest(".announcement") as HTMLDivElement;
const announcementId = announcement.dataset.announcementId;
window.localStorage.setItem(`announcement${announcementId}`, 'true');
}