mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-31 02:03:35 -04:00 
			
		
		
		
	Fix/multiple bug reports (#1002)
* fix type issues for #999 * fix regression #995 * remove error from frontend and log error #996 * cleanup darkmode on login page * keep primary color bg
This commit is contained in:
		| @@ -23,7 +23,7 @@ | ||||
| <script lang="ts"> | ||||
| import { computed, defineComponent, useContext } from "@nuxtjs/composition-api"; | ||||
| import { useUserApi } from "~/composables/api"; | ||||
| import {UserOut} from "~/types/api-types/user"; | ||||
| import { UserOut } from "~/types/api-types/user"; | ||||
| export default defineComponent({ | ||||
|   props: { | ||||
|     slug: { | ||||
| @@ -49,19 +49,15 @@ export default defineComponent({ | ||||
|     const isFavorite = computed(() => user.value?.favoriteRecipes?.includes(props.slug)); | ||||
|  | ||||
|     async function toggleFavorite() { | ||||
|       console.log("Favorited?"); | ||||
|       if (!isFavorite.value) { | ||||
|         await api.users.addFavorite(user.value?.id, props.slug); | ||||
|       } else { | ||||
|         await api.users.removeFavorite(user.value?.id, props.slug); | ||||
|       } | ||||
|       $auth.fetchUser(); | ||||
|     }; | ||||
|     } | ||||
|  | ||||
|     return { isFavorite, toggleFavorite }; | ||||
|   }, | ||||
| }); | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| </style> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user