fix(desktop): remove unnecessary setTimeout
This commit is contained in:
@@ -391,11 +391,7 @@ type ServerReadyData = { url: string; password: string | null }
|
||||
|
||||
// Gate component that waits for the server to be ready
|
||||
function ServerGate(props: { children: (data: Accessor<ServerReadyData>) => JSX.Element }) {
|
||||
const [serverData] = createResource<ServerReadyData>(() =>
|
||||
commands.ensureServerReady().then((v) => {
|
||||
return new Promise((res) => setTimeout(() => res(v as ServerReadyData), 2000))
|
||||
}),
|
||||
)
|
||||
const [serverData] = createResource(() => commands.ensureServerReady())
|
||||
|
||||
const errorMessage = () => {
|
||||
const error = serverData.error
|
||||
|
||||
Reference in New Issue
Block a user