| 
									
										
										
										
											2021-07-31 14:00:28 -08:00
										 |  |  | <template> | 
					
						
							| 
									
										
										
										
											2023-09-14 09:01:24 -05:00
										 |  |  |   <div v-if="groupSlug"> | 
					
						
							|  |  |  |     <RecipeExplorerPage :group-slug="groupSlug" /> | 
					
						
							|  |  |  |   </div> | 
					
						
							| 
									
										
										
										
											2021-07-31 14:00:28 -08:00
										 |  |  | </template> | 
					
						
							| 
									
										
										
										
											2022-02-13 12:23:42 -09:00
										 |  |  | 
 | 
					
						
							|  |  |  | <script lang="ts"> | 
					
						
							| 
									
										
										
										
											2023-09-19 12:06:39 -05:00
										 |  |  | import { defineComponent, ref } from "@nuxtjs/composition-api"; | 
					
						
							| 
									
										
										
										
											2023-09-14 09:01:24 -05:00
										 |  |  | import { invoke } from "@vueuse/core"; | 
					
						
							|  |  |  | import { useUserApi } from "~/composables/api/api-client"; | 
					
						
							|  |  |  | import RecipeExplorerPage from "~/components/Domain/Recipe/RecipeExplorerPage.vue"; | 
					
						
							| 
									
										
										
										
											2021-07-31 15:07:19 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | export default defineComponent({ | 
					
						
							| 
									
										
										
										
											2023-09-14 09:01:24 -05:00
										 |  |  |   components: { RecipeExplorerPage }, | 
					
						
							| 
									
										
										
										
											2021-07-31 15:07:19 -08:00
										 |  |  |   setup() { | 
					
						
							| 
									
										
										
										
											2023-09-14 09:01:24 -05:00
										 |  |  |     const api = useUserApi(); | 
					
						
							|  |  |  |     const groupSlug = ref<string>(); | 
					
						
							| 
									
										
										
										
											2023-02-19 17:13:29 -09:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-14 09:01:24 -05:00
										 |  |  |     invoke(async () => { | 
					
						
							| 
									
										
										
										
											2023-09-19 12:06:39 -05:00
										 |  |  |       const { data } = await api.users.getSelfGroup(); | 
					
						
							|  |  |  |       groupSlug.value = data?.slug; | 
					
						
							| 
									
										
										
										
											2023-02-19 17:13:29 -09:00
										 |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return { | 
					
						
							| 
									
										
										
										
											2023-09-14 09:01:24 -05:00
										 |  |  |       groupSlug, | 
					
						
							| 
									
										
										
										
											2023-02-19 17:13:29 -09:00
										 |  |  |     }; | 
					
						
							| 
									
										
										
										
											2021-07-31 15:07:19 -08:00
										 |  |  |   }, | 
					
						
							|  |  |  | }); | 
					
						
							|  |  |  | </script> |