@@ -5,9 +5,8 @@ import { UserCancelledError } from "@zmkfirmware/zmk-studio-ts-client/transport/
55import type { AvailableDevice } from "./tauri/index" ;
66import { Bluetooth , RefreshCw } from "lucide-react" ;
77import { Key , ListBox , ListBoxItem , Selection } from "react-aria-components" ;
8- import { useModalRef } from "./misc/useModalRef" ;
98import { ExternalLink } from "./misc/ExternalLink" ;
10- import { GenericModal } from "./GenericModal " ;
9+ import { Modal , ModalContent } from "./modal/Modal " ;
1110
1211export type TransportFactory = {
1312 label : string ;
@@ -278,16 +277,16 @@ export const ConnectModal = ({
278277 transports,
279278 onTransportCreated,
280279} : ConnectModalProps ) => {
281- const dialog = useModalRef ( open || false , false , false ) ;
282-
283280 const haveTransports = useMemo ( ( ) => transports . length > 0 , [ transports ] ) ;
284281
285282 return (
286- < GenericModal ref = { dialog } className = "max-w-xl" >
287- < h1 className = "text-xl" > Welcome to ZMK Studio</ h1 >
288- { haveTransports
289- ? connectOptions ( transports , onTransportCreated , open )
290- : noTransportsOptionsPrompt ( ) }
291- </ GenericModal >
283+ < Modal open = { open ?? true } onOpenChange = { ( ) => { } } onEscapeClose = { false } onBackdropClose = { false } >
284+ < ModalContent className = "w-96" showCloseButton = { false } >
285+ < h1 className = "text-xl" > Welcome to ZMK Studio</ h1 >
286+ { haveTransports
287+ ? connectOptions ( transports , onTransportCreated , open )
288+ : noTransportsOptionsPrompt ( ) }
289+ </ ModalContent >
290+ </ Modal >
292291 ) ;
293292} ;
0 commit comments