mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-08 01:45:28 +00:00
Format and automatically fix linted code.
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
import { InfoCircle } from "@styled-icons/boxicons-regular";
|
||||
import { Children } from "../../../types/Preact";
|
||||
import { Username } from "./UserShort";
|
||||
import styled from "styled-components";
|
||||
import UserStatus from "./UserStatus";
|
||||
import Tooltip from "../Tooltip";
|
||||
import { User } from "revolt.js";
|
||||
import styled from "styled-components";
|
||||
|
||||
import { Children } from "../../../types/Preact";
|
||||
import Tooltip from "../Tooltip";
|
||||
import { Username } from "./UserShort";
|
||||
import UserStatus from "./UserStatus";
|
||||
|
||||
interface Props {
|
||||
user?: User,
|
||||
children: Children
|
||||
user?: User;
|
||||
children: Children;
|
||||
}
|
||||
|
||||
const Base = styled.div`
|
||||
@@ -38,16 +39,18 @@ const Base = styled.div`
|
||||
|
||||
export default function UserHover({ user, children }: Props) {
|
||||
return (
|
||||
<Tooltip placement="right-end" content={
|
||||
<Base>
|
||||
<Username className="username" user={user} />
|
||||
<span className="status">
|
||||
<UserStatus user={user} />
|
||||
</span>
|
||||
{/*<div className="tip"><InfoCircle size={13}/>Right-click on the avatar to access the quick menu</div>*/}
|
||||
</Base>
|
||||
}>
|
||||
{ children }
|
||||
<Tooltip
|
||||
placement="right-end"
|
||||
content={
|
||||
<Base>
|
||||
<Username className="username" user={user} />
|
||||
<span className="status">
|
||||
<UserStatus user={user} />
|
||||
</span>
|
||||
{/*<div className="tip"><InfoCircle size={13}/>Right-click on the avatar to access the quick menu</div>*/}
|
||||
</Base>
|
||||
}>
|
||||
{children}
|
||||
</Tooltip>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import { User } from "revolt.js";
|
||||
import { Users } from "revolt.js/dist/api/objects";
|
||||
|
||||
import { Text } from "preact-i18n";
|
||||
|
||||
import Tooltip from "../Tooltip";
|
||||
|
||||
interface Props {
|
||||
@@ -14,10 +15,10 @@ export default function UserStatus({ user, tooltip }: Props) {
|
||||
if (user.status?.text) {
|
||||
if (tooltip) {
|
||||
return (
|
||||
<Tooltip arrow={undefined} content={ user.status.text }>
|
||||
{ user.status.text }
|
||||
<Tooltip arrow={undefined} content={user.status.text}>
|
||||
{user.status.text}
|
||||
</Tooltip>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return <>{user.status.text}</>;
|
||||
|
||||
Reference in New Issue
Block a user