mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-03-03 22:37:23 -08: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>
|