Find resources from store

This commit is contained in:
Kevin Van Der Werff
2019-06-22 04:05:03 +02:00
parent f1a8d056d7
commit 48aeb6f804
2 changed files with 9 additions and 4 deletions

View File

@@ -1,3 +1,9 @@
import resources from '../resources/'
export const state = () => resources
export const state = () => resources
export const getters = {
findResources: state => title => {
return state.find(resource => resource.title.toLowerCase() === title.toLowerCase())
}
}