move hooks before early return in BoardView, remove unused attachmentMode prop

This commit is contained in:
2026-02-15 19:30:58 +02:00
parent 443588d4cb
commit 0b70ee656f
3 changed files with 18 additions and 23 deletions

View File

@@ -24,9 +24,6 @@ export function CardDetailModal({ cardId, onClose }: CardDetailModalProps) {
cardId ? s.board?.cards[cardId] ?? null : null
);
const boardLabels = useBoardStore((s) => s.board?.labels ?? []);
const attachmentMode = useBoardStore(
(s) => s.board?.settings.attachmentMode ?? "link"
);
const updateCard = useBoardStore((s) => s.updateCard);
const open = cardId != null && card != null;
@@ -82,7 +79,6 @@ export function CardDetailModal({ cardId, onClose }: CardDetailModalProps) {
<AttachmentSection
cardId={cardId}
attachments={card.attachments}
attachmentMode={attachmentMode}
/>
</div>
</div>