Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored May 22, 2024
1 parent bc83f4b commit 54db2ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions clients/tabby-chat-panel/src/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ function useClient(iframeRef: RefObject<HTMLIFrameElement>, api: ClientApi) {
const clientRef = useRef<ServerApi | null>(null)

useEffect(() => {
if (iframeRef.current && !clientRef.current) {
if (iframeRef.current && !clientRef.current)
clientRef.current = createClient(iframeRef.current, api)
}
}, [iframeRef.current])

return clientRef.current
Expand All @@ -21,9 +20,8 @@ function useServer(api: ServerApi) {

useEffect(() => {
const isInIframe = window.self !== window.top
if (isInIframe && !serverRef.current) {
if (isInIframe && !serverRef.current)
serverRef.current = createServer(api)
}
}, [])

return serverRef.current
Expand Down
4 changes: 2 additions & 2 deletions clients/tabby-chat-panel/src/vscode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ function ChatPanel() {
if (iframeRef?.current && token) {
client?.init({
fetcherOptions: {
authorization: token
}
authorization: token,
},
})
}
}, [iframeRef?.current, client, token])
Expand Down

0 comments on commit 54db2ae

Please sign in to comment.