1
0
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:
Puyodead1 2023-11-30 15:07:59 -05:00
parent e95cac3c12
commit 85db30d760
No known key found for this signature in database
GPG Key ID: A4FA4FEC0DD353FC

View File

@ -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>
); );