Add hashtag in tags of fold card
This commit is contained in:
parent
426d41ba44
commit
6c9f566d3d
|
@ -105,7 +105,7 @@ export function EditFoldButton(props: { fold: Fold; className?: string }) {
|
|||
</div>
|
||||
|
||||
<Spacer h={4} />
|
||||
<TagsList tags={tags.map((tag) => `#${tag}`)} noLink noLabel />
|
||||
<TagsList tags={tags} noLink noLabel />
|
||||
<Spacer h={4} />
|
||||
|
||||
<div className="modal-action">
|
||||
|
|
|
@ -27,7 +27,7 @@ export function TagsInput(props: { contract: Contract; className?: string }) {
|
|||
|
||||
return (
|
||||
<Col className={clsx('gap-4', className)}>
|
||||
<TagsList tags={newTags.map((tag) => `#${tag}`)} />
|
||||
<TagsList tags={newTags} />
|
||||
|
||||
<Row className="items-center gap-4">
|
||||
<input
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Row } from './layout/row'
|
|||
import { SiteLink } from './site-link'
|
||||
import { Fold } from '../../common/fold'
|
||||
|
||||
export function Hashtag(props: { tag: string; noLink?: boolean }) {
|
||||
function Hashtag(props: { tag: string; noLink?: boolean }) {
|
||||
const { tag, noLink } = props
|
||||
const body = (
|
||||
<div
|
||||
|
@ -35,7 +35,11 @@ export function TagsList(props: {
|
|||
<Row className={clsx('items-center flex-wrap gap-2', className)}>
|
||||
{!noLabel && <div className="text-gray-500 mr-1">Tags</div>}
|
||||
{tags.map((tag) => (
|
||||
<Hashtag key={tag} tag={tag} noLink={noLink} />
|
||||
<Hashtag
|
||||
key={tag}
|
||||
tag={tag.startsWith('#') ? tag : `#${tag}`}
|
||||
noLink={noLink}
|
||||
/>
|
||||
))}
|
||||
</Row>
|
||||
)
|
||||
|
|
|
@ -341,7 +341,7 @@ function FoldOverview(props: { fold: Fold; curator: User }) {
|
|||
Includes markets matching any of these tags:
|
||||
</div>
|
||||
|
||||
<TagsList tags={tags.map((tag) => `#${tag}`)} noLabel />
|
||||
<TagsList tags={tags} noLabel />
|
||||
</Col>
|
||||
</Col>
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user