web-player: remove dead code and unused props
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import type { PageServerLoad, Actions } from './$types';
|
||||
import { createApiClient, unwrapOrError } from '$lib/server/api';
|
||||
import { addAlbumToPlaylistAction, addTrackAction } from '$lib/server/playlistActions';
|
||||
import { followUserAction, unfollowUserAction } from '$lib/server/followActions';
|
||||
import {
|
||||
EXPLORE_ALBUMS_PAGE_SIZE,
|
||||
EXPLORE_PAGE_SIZE as PAGE_SIZE,
|
||||
@@ -66,7 +65,5 @@ export const load: PageServerLoad = async ({ url, locals, fetch }) => {
|
||||
|
||||
export const actions: Actions = {
|
||||
addTrack: addTrackAction,
|
||||
addAlbumToPlaylist: addAlbumToPlaylistAction,
|
||||
follow: followUserAction,
|
||||
unfollow: unfollowUserAction
|
||||
addAlbumToPlaylist: addAlbumToPlaylistAction
|
||||
};
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import type { PageServerLoad, Actions } from './$types';
|
||||
import type { PageServerLoad } from './$types';
|
||||
import { createApiClient, optionalUser, unwrapOrError } from '$lib/server/api';
|
||||
import { fetchFollowList } from '$lib/server/follows';
|
||||
import { followUserAction, unfollowUserAction } from '$lib/server/followActions';
|
||||
import { FOLLOW_LIST_PAGE_SIZE } from '$lib/config';
|
||||
|
||||
export const load: PageServerLoad = async ({ params, locals, url, fetch, parent }) => {
|
||||
@@ -25,8 +24,3 @@ export const load: PageServerLoad = async ({ params, locals, url, fetch, parent
|
||||
viewerId: viewer?.sub ?? null
|
||||
};
|
||||
};
|
||||
|
||||
export const actions: Actions = {
|
||||
follow: followUserAction,
|
||||
unfollow: unfollowUserAction
|
||||
};
|
||||
|
||||
@@ -5,12 +5,11 @@
|
||||
import PageHeader from '$lib/components/ui/layout/PageHeader.svelte';
|
||||
import EmptyState from '$lib/components/ui/primitives/EmptyState.svelte';
|
||||
import InfiniteScroll from '$lib/components/ui/primitives/InfiniteScroll.svelte';
|
||||
import Alert from '$lib/components/ui/primitives/Alert.svelte';
|
||||
import UserRow from '$lib/components/ui/media/UserRow.svelte';
|
||||
import { appendUnique } from '$lib/data/collections';
|
||||
import { plural } from '$lib/utils/format';
|
||||
|
||||
let { data, form } = $props();
|
||||
let { data } = $props();
|
||||
|
||||
type ListUser = NonNullable<typeof data.users>['items'][number];
|
||||
|
||||
@@ -62,10 +61,6 @@
|
||||
: plural(total, 'usuario', 'usuarios')}
|
||||
/>
|
||||
|
||||
{#if form?.message}
|
||||
<Alert class="mb-4">{form.message}</Alert>
|
||||
{/if}
|
||||
|
||||
{#if data.forbidden}
|
||||
<EmptyState
|
||||
icon={Lock}
|
||||
|
||||
Reference in New Issue
Block a user