2022-04-01 11:05:25 -08:00
|
|
|
<template>
|
2025-06-20 00:09:12 +07:00
|
|
|
<div scoped-slot />
|
2022-04-01 11:05:25 -08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
/**
|
|
|
|
* Renderless component that only renders if the user is logged in.
|
|
|
|
* and has advanced options toggled.
|
|
|
|
*/
|
2025-06-20 00:09:12 +07:00
|
|
|
export default defineNuxtComponent({
|
2022-04-01 11:05:25 -08:00
|
|
|
setup(_, ctx) {
|
2025-06-20 00:09:12 +07:00
|
|
|
const $auth = useMealieAuth();
|
2022-04-01 11:05:25 -08:00
|
|
|
|
2025-06-20 00:09:12 +07:00
|
|
|
const r = $auth.user.value?.advanced || false;
|
2022-04-01 11:05:25 -08:00
|
|
|
|
|
|
|
return () => {
|
|
|
|
return r ? ctx.slots.default?.() : null;
|
|
|
|
};
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|