fix: generateDocument 반환값 불일치 + documents undefined 방어
ipcSuccess(doc)가 MeetingDocument를 직접 반환하는데 UI에서 resp.data.document로 접근하여 undefined 크래시. resp.data로 직접 접근하도록 수정. preload 타입도 수정.
This commit is contained in:
parent
f0e221058d
commit
6dd4846de7
2 changed files with 7 additions and 6 deletions
|
|
@ -623,7 +623,7 @@ const electronAPI = {
|
||||||
updateTranscript: (params: MeetingUpdateTranscriptParams) =>
|
updateTranscript: (params: MeetingUpdateTranscriptParams) =>
|
||||||
invoke<void>(IPC_CHANNELS.MEETING_MODE.UPDATE_TRANSCRIPT, params),
|
invoke<void>(IPC_CHANNELS.MEETING_MODE.UPDATE_TRANSCRIPT, params),
|
||||||
generateDocument: (params: MeetingGenerateDocParams) =>
|
generateDocument: (params: MeetingGenerateDocParams) =>
|
||||||
invoke<MeetingGenerateDocResult>(IPC_CHANNELS.MEETING_MODE.GENERATE_DOCUMENT, params),
|
invoke<MeetingDocument>(IPC_CHANNELS.MEETING_MODE.GENERATE_DOCUMENT, params),
|
||||||
getDocuments: (params: MeetingGetDocsParams) =>
|
getDocuments: (params: MeetingGetDocsParams) =>
|
||||||
invoke<MeetingDocument[]>(IPC_CHANNELS.MEETING_MODE.GET_DOCUMENTS, params),
|
invoke<MeetingDocument[]>(IPC_CHANNELS.MEETING_MODE.GET_DOCUMENTS, params),
|
||||||
updateDocument: (params: MeetingUpdateDocParams) =>
|
updateDocument: (params: MeetingUpdateDocParams) =>
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ export function MeetingDetailTabs({
|
||||||
})
|
})
|
||||||
setGenerating(false)
|
setGenerating(false)
|
||||||
if (resp.success) {
|
if (resp.success) {
|
||||||
const newDoc = resp.data.document
|
const newDoc = resp.data
|
||||||
setDocuments((prev) => {
|
setDocuments((prev) => {
|
||||||
// 새 문서 탭으로 이동: 전사(0) + 기존문서수 + 1
|
// 새 문서 탭으로 이동: 전사(0) + 기존문서수 + 1
|
||||||
setTabIndex(prev.length + 1)
|
setTabIndex(prev.length + 1)
|
||||||
|
|
@ -308,8 +308,9 @@ export function MeetingDetailTabs({
|
||||||
onSaveTranscript={handleSaveTranscript}
|
onSaveTranscript={handleSaveTranscript}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{documents.map((doc, idx) =>
|
{documents.filter(Boolean).map((doc, idx) => {
|
||||||
tabIndex === idx + 1 ? (
|
if (!doc || tabIndex !== idx + 1) return null
|
||||||
|
return (
|
||||||
<DocumentTab
|
<DocumentTab
|
||||||
key={doc.id}
|
key={doc.id}
|
||||||
document={doc}
|
document={doc}
|
||||||
|
|
@ -317,8 +318,8 @@ export function MeetingDetailTabs({
|
||||||
onExport={(format) => handleExportDocument(doc.id, format)}
|
onExport={(format) => handleExportDocument(doc.id, format)}
|
||||||
onDelete={() => handleDeleteDocument(doc.id)}
|
onDelete={() => handleDeleteDocument(doc.id)}
|
||||||
/>
|
/>
|
||||||
) : null,
|
)
|
||||||
)}
|
})}
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
{/* AI 채팅 패널 */}
|
{/* AI 채팅 패널 */}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue