Find resources from store
This commit is contained in:
@@ -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())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user