feishin/src/remote/components/buttons/reconnect-button.tsx

23 lines
642 B
TypeScript
Raw Normal View History

2025-05-20 19:23:36 -07:00
import { RiRestartLine } from 'react-icons/ri';
import { RemoteButton } from '/@/remote/components/buttons/remote-button';
import { useConnected, useReconnect } from '/@/remote/store';
export const ReconnectButton = () => {
const connected = useConnected();
const reconnect = useReconnect();
return (
<RemoteButton
$active={!connected}
mr={5}
2025-05-20 19:23:36 -07:00
onClick={() => reconnect()}
size="xl"
tooltip={connected ? 'Reconnect' : 'Not connected. Reconnect.'}
variant="default"
>
<RiRestartLine size={30} />
</RemoteButton>
);
};