[+] Change url when clicking on a blog post

This commit is contained in:
Hykilpikonna
2021-12-26 21:07:34 -05:00
parent d5dd3df17c
commit 4d5742affc
+8
View File
@@ -62,6 +62,14 @@ export default class BlogPostPreview extends Vue
{
// Collapse everything that's not this
$(`.card:not(.${this.uid})`).accordion('option', {active: false});
// Change url
console.log(this.isActive())
if (!this.isActive())
{
this.$router.push(`/blog?post=${this.meta.url_name}`)
}
else this.$router.push('/blog')
}
mounted(): void