Create Location component + tests
This commit is contained in:
@@ -35,5 +35,10 @@ export const actions = {
|
||||
|
||||
export const getters = {
|
||||
list: state => state.list,
|
||||
location: state => state.location
|
||||
location: state => state.location,
|
||||
getLocationsByFilmId: state => id => {
|
||||
return state.list.filter(location =>
|
||||
location.films.find(film => film.split("/")[4] === id)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user