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

Loading…
Cancel
Save