diff --git a/src/components/account-block.css b/src/components/account-block.css
new file mode 100644
index 00000000..2b760d80
--- /dev/null
+++ b/src/components/account-block.css
@@ -0,0 +1,14 @@
+.account-block {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ color: var(--text-color);
+ text-decoration: none;
+}
+.account-block:hover b {
+ text-decoration: underline;
+}
+
+.account-block.skeleton {
+ color: var(--bg-faded-color);
+}
diff --git a/src/components/account-block.jsx b/src/components/account-block.jsx
new file mode 100644
index 00000000..c8c2e54b
--- /dev/null
+++ b/src/components/account-block.jsx
@@ -0,0 +1,66 @@
+import './account-block.css';
+
+import emojifyText from '../utils/emojify-text';
+import states from '../utils/states';
+
+import Avatar from './avatar';
+
+function AccountBlock({
+ skeleton,
+ account,
+ avatarSize = 'xl',
+ instance,
+ external,
+ onClick,
+}) {
+ if (skeleton) {
+ return (
+
+
+
+ ████████
+
+ @██████
+
+
+ );
+ }
+
+ const { acct, avatar, avatarStatic, displayName, username, emojis, url } =
+ account;
+ const displayNameWithEmoji = emojifyText(displayName, emojis);
+
+ return (
+ {
+ if (external) return;
+ e.preventDefault();
+ if (onClick) return onClick(e);
+ states.showAccount = {
+ account,
+ instance,
+ };
+ }}
+ >
+
+
+ {displayName ? (
+
+ ) : (
+ {username}
+ )}
+
@{acct}
+
+
+ );
+}
+
+export default AccountBlock;
diff --git a/src/components/account.jsx b/src/components/account.jsx
index 385e119a..60090d84 100644
--- a/src/components/account.jsx
+++ b/src/components/account.jsx
@@ -10,10 +10,10 @@ import shortenNumber from '../utils/shorten-number';
import states, { hideAllModals } from '../utils/states';
import store from '../utils/store';
+import AccountBlock from './account-block';
import Avatar from './avatar';
import Icon from './icon';
import Link from './link';
-import NameText from './name-text';
function Account({ account, instance: propInstance, onClose }) {
const { masto, instance, authenticated } = api({ instance: propInstance });
@@ -158,8 +158,7 @@ function Account({ account, instance: propInstance, onClose }) {
{uiState === 'loading' ? (
<>
@@ -177,8 +176,12 @@ function Account({ account, instance: propInstance, onClose }) {
info && (
<>
{bot && (
diff --git a/src/pages/search.jsx b/src/pages/search.jsx
index 95bace4d..341b7862 100644
--- a/src/pages/search.jsx
+++ b/src/pages/search.jsx
@@ -3,6 +3,7 @@ import './search.css';
import { useEffect, useRef, useState } from 'preact/hooks';
import { useSearchParams } from 'react-router-dom';
+import AccountBlock from '../components/account-block';
import Avatar from '../components/avatar';
import Icon from '../components/icon';
import Link from '../components/link';
@@ -87,13 +88,7 @@ function Search() {
{accountResults.map((account) => (
-
-
-
-
+
))}