Forked from
clients / wotwizard-ui
195 commits behind the upstream repository.
-
Pierre-Jean CHANCELLIER authoredPierre-Jean CHANCELLIER authored
functions.js 324 B
export default (context, inject) => {
const isFavourite = (uid) => {
if (!localStorage.favourites) {
return false
} else if (JSON.parse(localStorage.favourites).includes(uid)) {
return true
}
return false
}
inject("isFavourite", isFavourite)
// For Nuxt <= 2.12, also add 👇
// context.$hello = hello
}