Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: hashtag search #4305

Merged
merged 2 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions apps/web/src/components/Shared/Markup/MarkupLink/Hashtag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import isPrideMonth from '@hey/lib/isPrideMonth';
import stopEventPropagation from '@hey/lib/stopEventPropagation';
import { Leafwatch } from '@lib/leafwatch';
import Link from 'next/link';
import urlcat from 'urlcat';

const Hashtag: FC<MarkupLinkProps> = ({ title }) => {
if (!title) {
Expand All @@ -23,12 +24,14 @@ const Hashtag: FC<MarkupLinkProps> = ({ title }) => {
<span className="inline-flex items-center space-x-1">
<span>
<Link
href={`/search?q=${title.slice(1)}&type=pubs&src=link_click`}
href={urlcat('/search', {
q: title,
src: 'link_click',
type: 'pubs'
})}
onClick={(event) => {
stopEventPropagation(event);
Leafwatch.track(PUBLICATION.CLICK_HASHTAG, {
hashtag: title.slice(1)
});
Leafwatch.track(PUBLICATION.CLICK_HASHTAG, { hashtag: tag });
}}
>
{isPrideHashtag ? <span className="pride-text">{title}</span> : title}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Shared/Navbar/NavItems/Logout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { FC } from 'react';

import { ArrowRightOnRectangleIcon } from '@heroicons/react/24/outline';
import { ArrowRightStartOnRectangleIcon } from '@heroicons/react/24/outline';
import { PROFILE } from '@hey/data/tracking';
import { useRevokeAuthenticationMutation } from '@hey/lens';
import cn from '@hey/ui/cn';
Expand Down Expand Up @@ -66,7 +66,7 @@ const Logout: FC<LogoutProps> = ({ className = '', onClick }) => {
}}
type="button"
>
<ArrowRightOnRectangleIcon className="size-4" />
<ArrowRightStartOnRectangleIcon className="size-4" />
<div>Logout</div>
</button>
);
Expand Down
Loading