mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
Use item in TextView when given
This commit is contained in:
parent
b9295128fd
commit
10e81c38c2
@ -15,19 +15,26 @@ import { decodeTag } from '#utils/FormatTags'
|
||||
import { hashTagRegex } from '#utils/HashTagRegex'
|
||||
import { fixUrls, mailRegex } from '#utils/ReplaceURLs'
|
||||
|
||||
import type { Item } from '#types/Item'
|
||||
import type { Tag } from '#types/Tag'
|
||||
|
||||
export const TextView = ({
|
||||
item,
|
||||
itemId,
|
||||
text,
|
||||
truncate = false,
|
||||
rawText,
|
||||
}: {
|
||||
item: Item
|
||||
itemId: string
|
||||
text?: string
|
||||
truncate?: boolean
|
||||
rawText?: string
|
||||
}) => {
|
||||
if (item) {
|
||||
text = item.text
|
||||
itemId = item.id
|
||||
}
|
||||
const tags = useTags()
|
||||
const addFilterTag = useAddFilterTag()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user