mirror of
https://github.com/aljazceru/rabbit.git
synced 2025-12-17 05:54:19 +01:00
update
This commit is contained in:
@@ -6,13 +6,13 @@ type ConfigProps = {
|
||||
};
|
||||
|
||||
const RelayConfig = () => {
|
||||
const { config, setConfig, addRelay, removeRelay } = useConfig();
|
||||
const { config, addRelay, removeRelay } = useConfig();
|
||||
|
||||
const [relayUrlInput, setRelayUrlInput] = createSignal<string>('');
|
||||
|
||||
const handleClickAddRelay: JSX.EventHandler<HTMLFormElement, Event> = (ev) => {
|
||||
ev.preventDefault();
|
||||
if (relayUrlInput().length > 0) return;
|
||||
if (relayUrlInput().length === 0) return;
|
||||
addRelay(relayUrlInput());
|
||||
setRelayUrlInput('');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user