Skip to content
Snippets Groups Projects
functions.js 324 B
Newer Older
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
}