fixed linting
This commit is contained in:
parent
1d9666e8e4
commit
6f77a07cda
|
|
@ -29,8 +29,14 @@ export default function RenameChainButton({ chain }: RenameChainButtonProps) {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
|
||||||
const formData = new FormData(event.currentTarget);
|
const formData = new FormData(event.currentTarget);
|
||||||
chain.name = formData.get("name")?.toString()!;
|
const newChainName = formData.get("name");
|
||||||
|
|
||||||
|
if (!newChainName) {
|
||||||
|
setIsError(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
chain.name = newChainName.toString();
|
||||||
const upsertedChain = await upsertChain(chain);
|
const upsertedChain = await upsertChain(chain);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user