mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-31 10:13:32 -04:00 
			
		
		
		
	* added non-admin route for fetching current group
* simplified frontend group slug fetching
* exposed public link even if user can't invite
* 🧹
		
	
		
			
				
	
	
		
			30 lines
		
	
	
		
			707 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			707 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
| <template>
 | |
|   <div v-if="groupSlug">
 | |
|     <RecipeExplorerPage :group-slug="groupSlug" />
 | |
|   </div>
 | |
| </template>
 | |
| 
 | |
| <script lang="ts">
 | |
| import { defineComponent, ref } from "@nuxtjs/composition-api";
 | |
| import { invoke } from "@vueuse/core";
 | |
| import { useUserApi } from "~/composables/api/api-client";
 | |
| import RecipeExplorerPage from "~/components/Domain/Recipe/RecipeExplorerPage.vue";
 | |
| 
 | |
| export default defineComponent({
 | |
|   components: { RecipeExplorerPage },
 | |
|   setup() {
 | |
|     const api = useUserApi();
 | |
|     const groupSlug = ref<string>();
 | |
| 
 | |
|     invoke(async () => {
 | |
|       const { data } = await api.users.getSelfGroup();
 | |
|       groupSlug.value = data?.slug;
 | |
|     });
 | |
| 
 | |
|     return {
 | |
|       groupSlug,
 | |
|     };
 | |
|   },
 | |
| });
 | |
| </script>
 |