Browse Source

add query param to websites

main
matthew 2 years ago
parent
commit
c587b2e757
  1. 8
      searching-front/app/core/components/WebsiteCard/WebsiteCard.tsx

8
searching-front/app/core/components/WebsiteCard/WebsiteCard.tsx

@ -7,12 +7,16 @@ interface Props {
description: string description: string
} }
const WebsiteCard = (props: Props) => { const WebsiteCard = (props: Props) => {
const urlObj = new URL(props.url)
urlObj.searchParams.set("from", "Searching.ton")
const url = urlObj.toString();
return ( return (
<div className={s.root}> <div className={s.root}>
<a target="_blank" className={s.titleLink} href={props.url}> <a target="_blank" className={s.titleLink} href={url}>
{props.title} {props.title}
</a> </a>
<a target="_blank" className={s.miniLink} href={props.url}> <a target="_blank" className={s.miniLink} href={url}>
{cleanUrlForUi(props.url)} {cleanUrlForUi(props.url)}
</a> </a>
<div className={s.description}>{props.description}</div> <div className={s.description}>{props.description}</div>

Loading…
Cancel
Save