Skip to content

Commit

Permalink
chore(Mention): temporarily disable lookup
Browse files Browse the repository at this point in the history
Need to find a way to get fetched account id after dispatch
  • Loading branch information
null2264 committed Oct 21, 2023
1 parent 2148c63 commit ed1a47d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/soapbox/components/mention.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useLayoutEffect } from 'react';
import { Link } from 'react-router-dom';

import { fetchAccount, fetchAccountByUsername } from 'soapbox/actions/accounts';
import { fetchAccount } from 'soapbox/actions/accounts';
import { useAppSelector, useAppDispatch } from 'soapbox/hooks';
import { makeGetAccount } from 'soapbox/selectors';

Expand All @@ -20,7 +20,6 @@ export const Mention: React.FC<IMention> = ({ mention }) => {
const dispatch = useAppDispatch();
const getchAccount = () => {
if (mention.id !== '') dispatch(fetchAccount(mention.id));
dispatch(fetchAccountByUsername(mention.acct));
};
const account: any = useAppSelector(state => ((mention.id !== '') ? getAccount(state, mention.id) : null) || { id: mention.id, fqn: mention.acct, acct: mention.acct, url: mention.url, username: mention.username, avatar: '' });
const avatarSize = 20;
Expand Down

0 comments on commit ed1a47d

Please sign in to comment.