small improvement

This commit is contained in:
Josep M Sobrepere
2024-12-19 11:10:32 +01:00
parent 331d4a547b
commit 60fc968607
2 changed files with 16 additions and 10 deletions
+1 -9
View File
@@ -24,6 +24,7 @@ import { Label } from "@/components/ui/label"
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"
import { ScrollArea } from "@/components/ui/scroll-area"
import {
isValidUri,
Network,
networkCategories,
onChangeChain,
@@ -36,15 +37,6 @@ import { useCommandState } from "cmdk"
import { Check, ChevronDown } from "lucide-react"
import { FC, useEffect, useRef, useState } from "react"
const isValidUri = (input: string): boolean => {
try {
new URL(input)
} catch {
return false
}
return true
}
const EmptyOption: React.FC<{
enteredText: string
selectedNetwork: Network