Update contribution URL

feat/topic-chat
Kamran Ahmed 2 weeks ago
parent 116afde835
commit b5caccfb51
  1. 94
      src/components/TopicDetail/TopicDetail.tsx

@ -560,68 +560,42 @@ export function TopicDetail(props: TopicDetailProps) {
)} )}
</> </>
)} )}
{/* Contribution */}
{canSubmitContribution &&
!hasEnoughLinks &&
contributionUrl &&
hasContent && (
<div className="mt-3 mb-12 border-t text-sm text-gray-400 sm:mt-12">
<h2 className="mt-4 mb-1 text-base font-medium text-black">
Help us add learning resources
</h2>
<p className="mb-4 leading-relaxed">
This popup should be a brief introductory paragraph for
the topic and a few links to good articles, videos, or any
other self-vetted learning resources. Please consider
submitting a PR to improve this content.
</p>
<a
href={contributionUrl}
target={'_blank'}
className="flex w-full items-center justify-center rounded-md bg-gray-800 p-2 text-sm text-white transition-colors hover:bg-black hover:text-white disabled:bg-green-200 disabled:text-black"
>
<GitHubIcon className="mr-2 inline-block h-4 w-4 text-white" />
Help us Improve this Content
</a>
</div>
)}
</div> </div>
{resourceId === 'devops' && activeTab === 'content' && ( {canSubmitContribution &&
<div className="mt-4"> contributionUrl &&
<a activeTab === 'content' &&
href={tnsLink} hasContent && (
target="_blank" <div className="mt-4">
className="hidden rounded-md border bg-gray-200 px-2 py-2 text-sm hover:bg-gray-300 sm:block" <a
> href={contributionUrl}
<span className="badge mr-1.5">Partner</span> target="_blank"
Get the latest {resourceTitleFromId(resourceId)} news from our className="hidden rounded-md border bg-gray-200 px-2 py-2 text-sm hover:bg-gray-300 sm:flex items-center justify-center"
sister site{' '} >
<span className="font-medium underline underline-offset-1"> <GitHubIcon className="mr-2 inline-block h-4 w-4 text-current" />
TheNewStack.io Help us Improve this Content
</span> </a>
</a>
<a
<a href={tnsLink}
href={tnsLink} 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({ category: 'PartnerClick',
category: 'PartnerClick', action: 'TNS Redirect',
action: 'TNS Redirect', label: 'Roadmap Topic / TNS Link',
label: 'Roadmap Topic / TNS Link', });
}); }}
}} >
> <span className="badge mr-1.5">Partner</span>
<span className="badge mr-1.5">Partner</span> Visit{' '}
Visit{' '} <span className="font-medium underline underline-offset-1">
<span className="font-medium underline underline-offset-1"> TheNewStack.io
TheNewStack.io </span>{' '}
</span>{' '} for {resourceTitleFromId(resourceId)} news
for {resourceTitleFromId(resourceId)} news </a>
</a> </div>
</div> )}
)}
</> </>
)} )}

Loading…
Cancel
Save