Skip to content

Commit

Permalink
fix: notes
Browse files Browse the repository at this point in the history
  • Loading branch information
casperiv0 committed Jan 9, 2024
1 parent 2d99100 commit 8a1e491
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import type {
import { useQuery } from "@tanstack/react-query";
import { RecordsCaseNumberColumn } from "../records-case-number-column";
import { RecordsStatsColumn } from "../records-stats-column";
import { Editor } from "components/editor/editor";
import { slateDataToString } from "@snailycad/utils/editor";

interface Props {
pendingCitizenRecords: GetManagePendingCitizenRecords;
Expand Down Expand Up @@ -134,11 +136,17 @@ export function PendingCitizenRecordsTab({ pendingCitizenRecords }: Props) {
<HoverCard>
<HoverCardTrigger asChild>
<span className="block max-w-[300px] truncate cursor-help">
{record.notes || common("none")}
{slateDataToString(record.descriptionData) || record.notes || common("none")}
</span>
</HoverCardTrigger>

<HoverCardContent>{record.notes}</HoverCardContent>
<HoverCardContent>
{record.descriptionData ? (
<Editor hideBorder isReadonly value={record.descriptionData} />
) : (
record.notes || common("none")
)}
</HoverCardContent>
</HoverCard>
),
stats: <RecordsStatsColumn record={record} />,
Expand Down

0 comments on commit 8a1e491

Please sign in to comment.