lint: remove unused imports and functions (7 fixes)
Co-Authored-By: Justin Edmund <justin@jedmund.com>
This commit is contained in:
parent
38b8b8995c
commit
30fde044d7
5 changed files with 2 additions and 14 deletions
|
|
@ -6,11 +6,9 @@ import { api } from '$lib/admin/api'
|
||||||
import AdminPage from '$lib/components/admin/AdminPage.svelte'
|
import AdminPage from '$lib/components/admin/AdminPage.svelte'
|
||||||
import Composer from '$lib/components/admin/composer'
|
import Composer from '$lib/components/admin/composer'
|
||||||
import PostMetadataPopover from '$lib/components/admin/PostMetadataPopover.svelte'
|
import PostMetadataPopover from '$lib/components/admin/PostMetadataPopover.svelte'
|
||||||
import Button from '$lib/components/admin/Button.svelte'
|
|
||||||
import PublishDropdown from '$lib/components/admin/PublishDropdown.svelte'
|
import PublishDropdown from '$lib/components/admin/PublishDropdown.svelte'
|
||||||
import type { JSONContent } from '@tiptap/core'
|
import type { JSONContent } from '@tiptap/core'
|
||||||
|
|
||||||
let loading = $state(false)
|
|
||||||
let saving = $state(false)
|
let saving = $state(false)
|
||||||
|
|
||||||
let title = $state('')
|
let title = $state('')
|
||||||
|
|
@ -155,7 +153,7 @@ import { api } from '$lib/admin/api'
|
||||||
onRemoveTag={removeTag}
|
onRemoveTag={removeTag}
|
||||||
onDelete={() => {}}
|
onDelete={() => {}}
|
||||||
onClose={() => (showMetadata = false)}
|
onClose={() => (showMetadata = false)}
|
||||||
onFieldUpdate={(key, value) => {
|
onFieldUpdate={(key, _value) => {
|
||||||
if (key === 'slug') {
|
if (key === 'slug') {
|
||||||
slugManuallySet = true
|
slugManuallySet = true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { onMount } from 'svelte'
|
import { onMount } from 'svelte'
|
||||||
import { goto } from '$app/navigation'
|
|
||||||
import { page } from '$app/stores'
|
import { page } from '$app/stores'
|
||||||
import ProjectForm from '$lib/components/admin/ProjectForm.svelte'
|
import ProjectForm from '$lib/components/admin/ProjectForm.svelte'
|
||||||
import type { Project } from '$lib/types/project'
|
import type { Project } from '$lib/types/project'
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
import { InfiniteLoader, LoaderState } from 'svelte-infinite'
|
import { InfiniteLoader, LoaderState } from 'svelte-infinite'
|
||||||
import { generateMetaTags } from '$lib/utils/metadata'
|
import { generateMetaTags } from '$lib/utils/metadata'
|
||||||
import { page } from '$app/stores'
|
import { page } from '$app/stores'
|
||||||
import { browser } from '$app/environment'
|
|
||||||
import type { PageData } from './$types'
|
import type { PageData } from './$types'
|
||||||
|
|
||||||
interface Album {
|
interface Album {
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
})) ?? []
|
})) ?? []
|
||||||
)
|
)
|
||||||
|
|
||||||
const formatDate = (dateString: string) => {
|
const _formatDate = (dateString: string) => {
|
||||||
const date = new Date(dateString)
|
const date = new Date(dateString)
|
||||||
return date.toLocaleDateString('en-US', {
|
return date.toLocaleDateString('en-US', {
|
||||||
month: 'long',
|
month: 'long',
|
||||||
|
|
|
||||||
|
|
@ -80,14 +80,6 @@ export const GET: RequestHandler = async ({ url }) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getWeeklyAlbumChart(client: LastClient, username: string): Promise<Album[]> {
|
|
||||||
const chart = await client.user.getWeeklyAlbumChart(username)
|
|
||||||
return chart.albums.map((album) => ({
|
|
||||||
...album,
|
|
||||||
images: { small: '', medium: '', large: '', extralarge: '', mega: '', default: '' }
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getRecentAlbums(
|
async function getRecentAlbums(
|
||||||
client: LastClient,
|
client: LastClient,
|
||||||
username: string,
|
username: string,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue