Skip to content

Commit

Permalink
fix: show correct network while editing
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurgeron committed Oct 16, 2024
1 parent 888bd00 commit cf82ab9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import { NetworkForm, useNetworkForm, useNetworks } from '~/systems/Network';
import { OverlayDialogTopbar } from '~/systems/Overlay';

export function UpdateNetwork() {
const { network, isLoading, handlers } = useNetworks();
const { editingNetwork, isLoading, handlers } = useNetworks();

const form = useNetworkForm({
defaultValues: network,
defaultValues: editingNetwork,
});

function onSubmit(data: NetworkFormValues) {
handlers.updateNetwork({ id: network?.id as string, data });
handlers.updateNetwork({ id: editingNetwork?.id as string, data });
}

return (
Expand Down

0 comments on commit cf82ab9

Please sign in to comment.