fix: hide create community for instances where that is disabled

This commit is contained in:
James Xylight committed 2025-09-05 20:59:09 -07:00
1 parent 383e6268f2
commit 5f9617b172
7 files changed
+70 -29

No files matched your search

+16 -13
View File
@@ -1,4 +1,5 @@
<script lang="ts">
import { site } from '$lib/lemmy.svelte'
import Header from '$lib/components/ui/layout/pages/Header.svelte'
import Tabs from '$lib/components/ui/layout/pages/Tabs.svelte'
import { t } from '$lib/i18n/translations'
@@ -10,18 +11,20 @@
{$t('nav.create.label')}
</Header>
<Tabs
style="subpage"
routes={[
{
href: '/create/post',
name: $t('nav.create.post'),
},
{
href: '/create/community',
name: $t('nav.create.community'),
},
]}
/>
{#if !site || !site.data?.site_view.local_site.community_creation_admin_only}
<Tabs
style="subpage"
routes={[
{
href: '/create/post',
name: $t('nav.create.post'),
},
{
href: '/create/community',
name: $t('nav.create.community'),
},
]}
/>
{/if}
{@render children?.()}