misc: change $site to a $state

This commit is contained in:
James Xylight committed 2025-02-09 11:17:01 -08:00
1 parent a94dd5f3d4
commit 8dcca84e60
85 files changed
+153 -140

No files matched your search

@@ -14,7 +14,7 @@
import UserLink from '$lib/components/lemmy/user/UserLink.svelte'
import Markdown from '$lib/components/markdown/Markdown.svelte'
import CommentActions from '$lib/components/lemmy/comment/CommentActions.svelte'
import { getClient } from '$lib/lemmy.js'
import { getClient } from '$lib/lemmy.svelte.js'
import { Disclosure, toast } from 'mono-svelte'
import { profile } from '$lib/auth.svelte.js'
import { Button, Modal } from 'mono-svelte'
@@ -1,6 +1,6 @@
<script lang="ts">
import type { CommentResponse } from 'lemmy-js-client'
import { getClient, site } from '$lib/lemmy.js'
import { getClient, site } from '$lib/lemmy.svelte.js'
import { createEventDispatcher } from 'svelte'
import Markdown from '$lib/components/markdown/Markdown.svelte'
import { profile } from '$lib/auth.svelte.js'
@@ -113,7 +113,7 @@
</Button>
{/snippet}
{#if $site}
{#if site.data}
<MenuButton
class="min-h-[16px] py-0"
onclick={() => (language = undefined)}
@@ -121,7 +121,7 @@
<Icon src={XMark} size="16" micro />
{$t('form.post.unset')}
</MenuButton>
{#each $site?.all_languages as languageOption}
{#each site.data?.all_languages as languageOption}
<MenuButton
class="min-h-[16px] py-0"
onclick={() => {
@@ -7,7 +7,7 @@
ChevronUp,
Icon,
} from 'svelte-hero-icons'
import { getClient, site } from '$lib/lemmy'
import { getClient, site } from '$lib/lemmy.svelte'
import { settings } from '$lib/settings.svelte'
import { profile } from '$lib/auth.svelte.js'
import FormattedNumber from '$lib/components/util/FormattedNumber.svelte'
@@ -5,7 +5,7 @@
import { page } from '$app/state'
import { onMount, setContext } from 'svelte'
import { Icon, ArrowDownCircle } from 'svelte-hero-icons'
import { getClient } from '$lib/lemmy.js'
import { getClient } from '$lib/lemmy.svelte.js'
import type { CommentView, Post } from 'lemmy-js-client'
import { fly } from 'svelte/transition'
import { toast } from 'mono-svelte'