Browse Source

1 Fix linter error re Permalink

Linter was complaining about a missing "href" on Permalink in the
hashtag component, but when I dug in, it's a partially merged feature
from this PR:

https://github.com/hometown-fork/hometown/issues/1249

If you look at the PR, there was never meant to be hashtag-specific
permalink functionality (this was code applied from an external patch), and
regardless I just checked and the hashtag functionality never worked
anyway (opening hashtag links in new windows).
dariusk-working/4_4_0
Darius Kazemi 4 months ago committed by Misty De Méo
parent
commit
e6058dfc67
  1. 6
      app/javascript/mastodon/components/hashtag.tsx
  2. 1
      app/javascript/mastodon/components/status_content.jsx

6
app/javascript/mastodon/components/hashtag.tsx

@ -9,7 +9,7 @@ import type Immutable from 'immutable';
import { Sparklines, SparklinesCurve } from 'react-sparklines';
import { Permalink } from 'mastodon/components/permalink';
import { Link } from 'react-router-dom';
import { ShortNumber } from 'mastodon/components/short_number';
import { Skeleton } from 'mastodon/components/skeleton';
@ -103,7 +103,7 @@ export const Hashtag: React.FC<HashtagProps> = ({
}) => (
<div className={classNames('trends__item', className)}>
<div className='trends__item__name'>
<Permalink to={to} href={href}>
<Link to={to}>
{name ? (
<>
#<span>{name}</span>
@ -111,7 +111,7 @@ export const Hashtag: React.FC<HashtagProps> = ({
) : (
<Skeleton width={50} />
)}
</Permalink>
</Link>
{description ? (
<span>{description}</span>

1
app/javascript/mastodon/components/status_content.jsx

@ -11,7 +11,6 @@ import { connect } from 'react-redux';
import ChevronRightIcon from '@/material-icons/400-24px/chevron_right.svg?react';
import { Icon } from 'mastodon/components/icon';
import { Permalink } from 'mastodon/components/permalink';
import PollContainer from 'mastodon/containers/poll_container';
import { identityContextPropShape, withIdentity } from 'mastodon/identity_context';
import { autoPlayGif, languages as preloadedLanguages, expandUsernames } from 'mastodon/initial_state';

Loading…
Cancel
Save