Skip to content

Commit

Permalink
chore(ui): dispatch event once user openes the news drawer
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosPaunovic authored Jul 4, 2024
1 parent d7c0812 commit 12a97fe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ui/src/components/layout/News.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import Markdown from "./Markdown.vue";
import DateAgo from "./DateAgo.vue";
import Drawer from "../Drawer.vue";
import {pageFromRoute} from "../../utils/eventsRouter";
export default {
components: {
Expand Down Expand Up @@ -64,6 +65,12 @@
show(event) {
event.preventDefault();
this.$store.dispatch("api/events", {
type: "PAGE",
news: {opened: true, hasUnread: this.isUnread()},
page: pageFromRoute(this.$router.currentRoute.value)
});
localStorage.setItem("feeds", this.feeds[0].publicationDate)
this.hasUnread = this.isUnread();
this.isOpen = !this.isOpen;
Expand Down

0 comments on commit 12a97fe

Please sign in to comment.