-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[Feat] AI 요약 클라이언트 연결
- Loading branch information
Showing
10 changed files
with
183 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Dialog } from '@/components/common/Dialog'; | ||
import { useAiSummary } from '@/hooks/api/dashboard'; | ||
|
||
import Loading from '../common/Loading'; | ||
|
||
interface AiSummaryDialogProps { | ||
isOpen: boolean; | ||
onClose: () => void; | ||
ticleId: string; | ||
} | ||
|
||
function AiSummaryDialog({ isOpen, onClose, ticleId }: AiSummaryDialogProps) { | ||
const { data } = useAiSummary(ticleId); | ||
|
||
return ( | ||
<Dialog.Root isOpen={isOpen} onClose={onClose} className="h-[30rem] w-[35rem]"> | ||
<Dialog.Title align="center">AI 음성 요약</Dialog.Title> | ||
<Dialog.Close onClose={onClose} /> | ||
<Dialog.Content className="custom-scrollbar overflow-y-scroll"> | ||
{!data || data?.summary.length === 0 ? ( | ||
<div className="flex h-[20rem] w-full flex-col items-center justify-center gap-10"> | ||
<Loading color="primary" /> | ||
<span className="whitespace-pre text-center text-title1 text-primary"> | ||
AI 요약을 처리중이에요. | ||
</span> | ||
</div> | ||
) : ( | ||
<p className="whitespace-pre text-body1">{data?.summary[0]}</p> | ||
)} | ||
</Dialog.Content> | ||
</Dialog.Root> | ||
); | ||
} | ||
|
||
export default AiSummaryDialog; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters