fix: select state.version for selector hook

This commit is contained in:
2024-05-01 10:52:24 +01:00
parent 6398e470ef
commit d3bcb75f3a
7 changed files with 13 additions and 9 deletions

View File

@ -18,7 +18,7 @@ export interface RelayProps {
export default function Relay(props: RelayProps) {
const navigate = useNavigate();
const state = useLogin(s => s.state);
const { state } = useLogin(s => ({ v: s.state.version, state: s.state }));
const name = useMemo(() => getRelayName(props.addr), [props.addr]);
const connection = useRelayState(props.addr);