feat: add loader on Socket ID label
parent
419af7a9d5
commit
632acd2cb0
|
@ -13,6 +13,7 @@ import {
|
||||||
Center,
|
Center,
|
||||||
Box,
|
Box,
|
||||||
TextInput,
|
TextInput,
|
||||||
|
Loader,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import {
|
import {
|
||||||
IconPlug,
|
IconPlug,
|
||||||
|
@ -78,7 +79,8 @@ const ChatroomTitle: FC<Props> = ({ targetSocketId, setTargetSocketId }) => {
|
||||||
<Popover.Dropdown>
|
<Popover.Dropdown>
|
||||||
<Group position="apart">
|
<Group position="apart">
|
||||||
<Text size="sm">SocketID</Text>
|
<Text size="sm">SocketID</Text>
|
||||||
{socket?.id && (
|
|
||||||
|
{socket?.id ? (
|
||||||
<CopyButton value={socket.id} timeout={2000}>
|
<CopyButton value={socket.id} timeout={2000}>
|
||||||
{({ copied, copy }) => (
|
{({ copied, copy }) => (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
|
@ -99,6 +101,8 @@ const ChatroomTitle: FC<Props> = ({ targetSocketId, setTargetSocketId }) => {
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
</CopyButton>
|
</CopyButton>
|
||||||
|
) : (
|
||||||
|
<Loader size="1em" color="blue" />
|
||||||
)}
|
)}
|
||||||
</Group>
|
</Group>
|
||||||
<Group position="apart">
|
<Group position="apart">
|
||||||
|
|
Loading…
Reference in New Issue