pl-fe: further change

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2026-01-16 01:02:03 +01:00
parent 6ff3cd1fd3
commit 63d226a206
3 changed files with 3 additions and 9 deletions

View File

@ -12,8 +12,8 @@ import Icon from 'pl-fe/components/ui/icon';
import Stack from 'pl-fe/components/ui/stack';
import Text from 'pl-fe/components/ui/text';
import Emojify from 'pl-fe/features/emoji/emojify';
import { useAcct } from 'pl-fe/hooks/use-acct';
import { useAppSelector } from 'pl-fe/hooks/use-app-selector';
import { usePlFeConfig } from 'pl-fe/hooks/use-pl-fe-config';
import { accountScrobbleQueryOptions } from 'pl-fe/queries/accounts/account-scrobble';
import { capitalize } from 'pl-fe/utils/strings';
@ -40,7 +40,7 @@ interface IProfileInfoPanel {
/** User profile metadata, such as location, birthday, etc. */
const ProfileInfoPanel: React.FC<IProfileInfoPanel> = ({ account, username }) => {
const intl = useIntl();
const { displayFqn } = usePlFeConfig();
const acct = useAcct(account);
const me = useAppSelector(state => state.me);
const ownAccount = account?.id === me;
@ -152,7 +152,7 @@ const ProfileInfoPanel: React.FC<IProfileInfoPanel> = ({ account, username }) =>
<HStack alignItems='center' space={0.5}>
<Text size='sm' theme='muted' direction='ltr' truncate>
@{displayFqn ? account.fqn : account.acct}
@{acct}
</Text>
{account.locked && (

View File

@ -11,7 +11,6 @@ import type { Account } from 'pl-api';
const useAcct = (account?: Pick<Account, 'fqn' | 'acct' | 'local' | 'url'>): string | undefined => {
const fqn = useAppSelector((state) => displayFqn(state));
const instance = useInstance();
const localUrl = useOwnAccount().account?.url;
return useMemo(() => {

View File

@ -22,12 +22,7 @@ const getBaseURL = (account: Pick<Account, 'url'>): string => {
}
};
const getAcct = (account: Pick<Account, 'fqn' | 'acct'>, displayFqn: boolean): string => (
displayFqn === true ? account.fqn : account.acct
);
export {
getDomain,
getBaseURL,
getAcct,
};