fix: TS errors, serialize calls, unused imports, pre-commit hook
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
type UIAuthError = {
|
||||
status: number
|
||||
code: string
|
||||
message: string
|
||||
}
|
||||
|
||||
defineProps<{
|
||||
authError?: UIAuthError
|
||||
}>()
|
||||
|
||||
@@ -84,8 +84,7 @@
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { crossIcon } from '~/assets/icons'
|
||||
import { Navigation, Pagination } from 'vue3-carousel'
|
||||
import type { NewImage, ServerImage } from '../../../app/types/UItypes'
|
||||
import type { Image } from '~/pages/types/UITypes'
|
||||
import type { Image, NewImage, ServerImage } from '~/pages/types/UITypes'
|
||||
|
||||
const props = defineProps<{
|
||||
galleryId: string
|
||||
@@ -134,12 +133,12 @@ function addImage() {
|
||||
|
||||
function removeImage(image: Image) {
|
||||
if ('id' in image) {
|
||||
const index = serverImages.value.findIndex((img) => img.id === image.id)
|
||||
const index = serverImages.value.findIndex((img: ServerImage) => img.id === image.id)
|
||||
if (index !== -1) {
|
||||
serverImages.value.splice(index, 1)
|
||||
}
|
||||
} else {
|
||||
const index = newImages.value.findIndex((img) => img.file === image.file)
|
||||
const index = newImages.value.findIndex((img: NewImage) => img.file === image.file)
|
||||
if (index !== -1) {
|
||||
newImages.value.splice(index, 1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user