stuff
Some checks are pending
Deploy Admin Panel / Deploy Admin Panel (push) Waiting to run
Deploy Admin Panel / Admin Panel Verification (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions

This commit is contained in:
Dmitry 2025-12-17 04:45:57 +03:00
parent dfc5ba43c3
commit af5ba195b3

View file

@ -34,9 +34,6 @@ import {
AlertDialogTitle,
} from '@/components/ui/alert-dialog'
import { Label } from '@/components/ui/label'
import { Textarea } from '@/components/ui/textarea'
import { ImageUpload } from '@/components/ui/image-upload'
import { CardVoicesManager } from '@/components/CardVoicesManager'
import { BulkCardUpload } from '@/components/BulkCardUpload'
import { BulkCardEditor } from '@/components/BulkCardEditor'
import { CardEditorPreview } from '@/components/CardEditorPreview'
@ -204,10 +201,8 @@ export default function CardsPage() {
// Determine if this is an update or create
// Check if id exists and is not empty (handle both string and number)
const hasValidId = selectedCard?.id != null &&
selectedCard.id !== '' &&
selectedCard.id !== 0 &&
String(selectedCard.id).trim() !== ''
const idStr = selectedCard?.id != null ? String(selectedCard.id) : ''
const hasValidId = idStr !== '' && idStr.trim() !== '' && idStr !== '0'
const isUpdate = selectedCard !== null && hasValidId
const cardData: GameCardDto = {