mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-23 12:54:42 +00:00
fix(desktop): remove unnecessary setTimeout
This commit is contained in:
parent
0ccae0cea6
commit
f148d38b49
1 changed files with 1 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue