lint: remove unused imports and variables (8 fixes)
Co-Authored-By: Justin Edmund <justin@jedmund.com>
This commit is contained in:
parent
841ee79885
commit
6ae7a18443
6 changed files with 4 additions and 14 deletions
|
|
@ -117,7 +117,7 @@
|
|||
|
||||
{#if showThumbnails}
|
||||
<div class="thumbnails">
|
||||
{#each Array(totalSlots) as _slot, index}
|
||||
{#each Array(totalSlots) as _, index}
|
||||
{#if index < displayItems.length}
|
||||
<button
|
||||
class="thumbnail"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
<script lang="ts">
|
||||
import { z } from 'zod'
|
||||
import AdminPage from './AdminPage.svelte'
|
||||
import AdminSegmentedControl from './AdminSegmentedControl.svelte'
|
||||
import Input from './Input.svelte'
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
import Button from './Button.svelte'
|
||||
import FileUploadZone from './FileUploadZone.svelte'
|
||||
import FilePreviewList from './FilePreviewList.svelte'
|
||||
import { formatFileSize } from '$lib/utils/mediaHelpers'
|
||||
|
||||
interface Props {
|
||||
isOpen: boolean
|
||||
|
|
@ -59,7 +58,7 @@
|
|||
files = files.filter((f) => f.name !== id)
|
||||
// Clear any related upload progress
|
||||
if (uploadProgress[fileToRemove.name]) {
|
||||
const { [fileToRemove.name]: removed, ...rest } = uploadProgress
|
||||
const { [fileToRemove.name]: _, ...rest } = uploadProgress
|
||||
uploadProgress = rest
|
||||
}
|
||||
}
|
||||
|
|
@ -92,7 +91,7 @@
|
|||
successCount++
|
||||
uploadProgress = { ...uploadProgress, [file.name]: 100 }
|
||||
}
|
||||
} catch (error) {
|
||||
} catch {
|
||||
uploadErrors = [...uploadErrors, `${file.name}: Network error`]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
type Props = {
|
||||
post: Post
|
||||
postType: 'post' | 'essay'
|
||||
slug: string
|
||||
tags: string[]
|
||||
tagInput: string
|
||||
|
|
@ -18,7 +17,6 @@
|
|||
|
||||
let {
|
||||
post,
|
||||
postType,
|
||||
slug = $bindable(),
|
||||
tags = $bindable(),
|
||||
tagInput = $bindable(),
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
import Composer from './composer'
|
||||
import ProjectMetadataForm from './ProjectMetadataForm.svelte'
|
||||
import ProjectBrandingForm from './ProjectBrandingForm.svelte'
|
||||
import ProjectImagesForm from './ProjectImagesForm.svelte'
|
||||
import AutoSaveStatus from './AutoSaveStatus.svelte'
|
||||
import DraftPrompt from './DraftPrompt.svelte'
|
||||
import { toast } from '$lib/stores/toast'
|
||||
|
|
@ -32,7 +31,6 @@
|
|||
// UI state
|
||||
let isLoading = $state(mode === 'edit')
|
||||
let hasLoaded = $state(mode === 'create')
|
||||
let isSaving = $state(false)
|
||||
let activeTab = $state('metadata')
|
||||
let error = $state<string | null>(null)
|
||||
let successMessage = $state<string | null>(null)
|
||||
|
|
@ -134,8 +132,6 @@
|
|||
const loadingToastId = toast.loading(`${mode === 'edit' ? 'Saving' : 'Creating'} project...`)
|
||||
|
||||
try {
|
||||
isSaving = true
|
||||
|
||||
const payload = {
|
||||
...formStore.buildPayload(),
|
||||
// Include updatedAt for concurrency control in edit mode
|
||||
|
|
@ -165,8 +161,6 @@
|
|||
toast.error(`Failed to ${mode === 'edit' ? 'save' : 'create'} project`)
|
||||
}
|
||||
console.error(err)
|
||||
} finally {
|
||||
isSaving = false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ $effect(() => {
|
|||
})
|
||||
|
||||
// Navigation guard: flush autosave before navigating away (only if unsaved)
|
||||
beforeNavigate(async (navigation) => {
|
||||
beforeNavigate(async (_navigation) => {
|
||||
if (hasLoaded && autoSave) {
|
||||
if (autoSave.status === 'saved') {
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue