mirror of
https://github.com/spacebarchat/client.git
synced 2024-11-26 12:12:36 +01:00
dummy user mention click
This commit is contained in:
parent
e95cac3c12
commit
85db30d760
@ -25,6 +25,11 @@ function UserMention({ id }: MentionProps) {
|
|||||||
const app = useAppStore();
|
const app = useAppStore();
|
||||||
const [user, setUser] = React.useState<User | null>(null);
|
const [user, setUser] = React.useState<User | null>(null);
|
||||||
|
|
||||||
|
const click = () => {
|
||||||
|
if (!user) return;
|
||||||
|
// TODO: open user profile modal
|
||||||
|
};
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
const user = app.users.get(id);
|
const user = app.users.get(id);
|
||||||
if (user) setUser(user);
|
if (user) setUser(user);
|
||||||
@ -38,7 +43,7 @@ function UserMention({ id }: MentionProps) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container>
|
<Container onClick={click}>
|
||||||
<span>@{user.username}</span>
|
<span>@{user.username}</span>
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user