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