mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
484 B
TypeScript
21 lines
484 B
TypeScript
import React from 'react';
|
|
import { useGroupInfo } from 'tailchat-shared';
|
|
|
|
interface GroupNameProps {
|
|
groupId: string;
|
|
className?: string;
|
|
style?: React.CSSProperties;
|
|
}
|
|
|
|
export const GroupName: React.FC<GroupNameProps> = React.memo((props) => {
|
|
const { groupId, className, style } = props;
|
|
const groupInfo = useGroupInfo(groupId);
|
|
|
|
return (
|
|
<span className={className} style={style}>
|
|
{groupInfo?.name}
|
|
</span>
|
|
);
|
|
});
|
|
GroupName.displayName = 'GroupName';
|