Update TNS link in topic page

pull/5579/head
Kamran Ahmed 7 months ago
parent 0fa4dfe93e
commit 6c977a2781
  1. 9
      src/components/TopicDetail/TopicDetail.tsx

@ -214,6 +214,9 @@ export function TopicDetail(props: TopicDetailProps) {
const googleSearchUrl = `https://www.google.com/search?q=${topicHtmlTitle?.toLowerCase()} guide for ${resourceTitleForSearch}`; const googleSearchUrl = `https://www.google.com/search?q=${topicHtmlTitle?.toLowerCase()} guide for ${resourceTitleForSearch}`;
const youtubeSearchUrl = `https://www.youtube.com/results?search_query=${topicHtmlTitle?.toLowerCase()} for ${resourceTitleForSearch}`; const youtubeSearchUrl = `https://www.youtube.com/results?search_query=${topicHtmlTitle?.toLowerCase()} for ${resourceTitleForSearch}`;
const tnsLink =
'https://thenewstack.io/devops/?utm_source=roadmap.sh&utm_medium=Referral&utm_campaign=Topic';
return ( return (
<div className={'relative z-50'}> <div className={'relative z-50'}>
<div <div
@ -351,7 +354,7 @@ export function TopicDetail(props: TopicDetailProps) {
{resourceId === 'devops' && ( {resourceId === 'devops' && (
<div className="mt-4"> <div className="mt-4">
<a <a
href={'https://thenewstack.io'} href={tnsLink}
target="_blank" target="_blank"
className="hidden rounded-md border bg-gray-200 px-2 py-2 text-sm hover:bg-gray-300 sm:block" className="hidden rounded-md border bg-gray-200 px-2 py-2 text-sm hover:bg-gray-300 sm:block"
> >
@ -364,9 +367,7 @@ export function TopicDetail(props: TopicDetailProps) {
</a> </a>
<a <a
href={ href={tnsLink}
'https://thenewstack.io/devops/?utm_source=roadmap.sh&utm_medium=Referral&utm_campaign=Topic'
}
className="hidden rounded-md border bg-gray-200 px-2 py-1.5 text-sm hover:bg-gray-300 min-[390px]:block sm:hidden" className="hidden rounded-md border bg-gray-200 px-2 py-1.5 text-sm hover:bg-gray-300 min-[390px]:block sm:hidden"
onClick={() => { onClick={() => {
window.fireEvent({ window.fireEvent({

Loading…
Cancel
Save