Passing logged-in user credentials from twig to vue.
This commit is contained in:
@@ -52,6 +52,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapState('booksmodule', ['books']),
|
||||
...mapState('usermodule', ['user']),
|
||||
},
|
||||
methods: {
|
||||
...mapActions('booksmodule', [
|
||||
@@ -62,7 +63,7 @@ export default {
|
||||
this.findAll(this.searchTerm);
|
||||
},
|
||||
updateHistory: function () {
|
||||
if (history.pushState) {
|
||||
if (this.searchTerm && history.pushState) {
|
||||
let url = window.location.protocol + "//" + window.location.host + window.location.pathname + '?search=' + this.searchTerm;
|
||||
window.history.pushState({path: url}, '', url);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user