2024-04-06 10:48:51 +05:30
|
|
|
import { Blocks, XIcon } from "lucide-react"
|
|
|
|
|
import { useMessageOption } from "@/hooks/useMessageOption"
|
2024-04-05 23:17:55 +05:30
|
|
|
|
2024-04-06 10:48:51 +05:30
|
|
|
export const SelectedKnowledge = () => {
|
|
|
|
|
const { selectedKnowledge: knowledge, setSelectedKnowledge } =
|
|
|
|
|
useMessageOption()
|
|
|
|
|
|
|
|
|
|
if (!knowledge) return <></>
|
2024-04-05 23:17:55 +05:30
|
|
|
|
|
|
|
|
return (
|
2024-04-06 10:48:51 +05:30
|
|
|
<div className="flex flex-row items-center gap-3">
|
|
|
|
|
<span className="text-lg font-thin text-zinc-300 dark:text-zinc-600">
|
|
|
|
|
{"/"}
|
|
|
|
|
</span>
|
|
|
|
|
<div className="border flex justify-between items-center rounded-md p-1 gap-2 bg-gray-100 dark:bg-gray-800 dark:border-gray-700">
|
|
|
|
|
<div className="inline-flex items-center gap-2">
|
|
|
|
|
<Blocks className="h-6 w-6 text-gray-400" />
|
|
|
|
|
<span className="text-xs font-semibold dark:text-gray-100">
|
2024-04-05 23:17:55 +05:30
|
|
|
{knowledge.title}
|
2024-04-06 10:48:51 +05:30
|
|
|
</span>
|
2024-04-05 23:17:55 +05:30
|
|
|
</div>
|
2024-04-06 10:48:51 +05:30
|
|
|
<div>
|
|
|
|
|
<button
|
|
|
|
|
onClick={() => setSelectedKnowledge(null)}
|
|
|
|
|
className="flex items-center justify-center bg-white dark:bg-[#262626] p-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-600 text-black dark:text-gray-100">
|
|
|
|
|
<XIcon className="h-3 w-3" />
|
|
|
|
|
</button>
|
2024-04-05 23:17:55 +05:30
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|