Skip to content

Commit

Permalink
chore: fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalbreuninger committed Dec 11, 2024
1 parent 2cba830 commit c1559ea
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion desktop/src/Theme/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const FormError = defineStyleConfig({
Tooltip.defaultProps = { ...Tooltip.defaultProps, placement: "top" }

const getInitialColorMode = (defaultColor: ColorMode = "light"): ColorMode => {
return (localStorage.getItem("chakra-ui-color-mode") as ColorMode) ?? defaultColor
return (localStorage.getItem("chakra-ui-color-mode") as ColorMode | undefined) ?? defaultColor
}

export const theme = extendTheme({
Expand Down
1 change: 1 addition & 0 deletions desktop/src/client/workspaces/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export class WorkspacesClient implements TDebuggable {

public async troubleshoot(ctx: TWorkspaceClientContext) {
const cmd = WorkspaceCommands.TroubleshootWorkspace(ctx.id)

return cmd.run()
}

Expand Down
1 change: 0 additions & 1 deletion desktop/src/contexts/DevPodContext/action/actionHistory.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { client } from "../../../client"
import { Action, TActionObj, TActions } from "./action"

const HISTORY_KEY = "devpod-workspace-action-history"
Expand Down
2 changes: 1 addition & 1 deletion desktop/src/views/Pro/BackToWorkspaces.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useProContext } from "@/contexts"
import { Routes } from "@/routes"
import { ChevronLeftIcon } from "@chakra-ui/icons"
import { Link } from "@chakra-ui/react"
import { Link as RouterLink, useNavigate } from "react-router-dom"
import { Link as RouterLink } from "react-router-dom"

export function BackToWorkspaces() {
const { host } = useProContext()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ function OptionFormField({
onChange,
placeholder,
displayName,
control,
])

return (
Expand Down
18 changes: 9 additions & 9 deletions desktop/src/views/Pro/Workspace/WorkspaceInstanceCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,6 @@ export function WorkspaceInstanceCard({ instanceName, host }: TWorkspaceInstance
return { parameters, template: currentTemplate }
}, [instance, templates])

if (!instance) {
return null
}

const handleOpenClicked = (ideName: string) => {
workspace.start({ id: instance.id, ideConfig: { name: ideName } })
navigate(Routes.toProWorkspace(host, instance.id))
}

const handleTroubleshootClicked = useCallback(() => {
if (instance && workspaceActions) {
storeTroubleshoot({
Expand All @@ -129,6 +120,15 @@ export function WorkspaceInstanceCard({ instanceName, host }: TWorkspaceInstance
}
}, [storeTroubleshoot, instance, workspaceActions])

if (!instance) {
return null
}

const handleOpenClicked = (ideName: string) => {
workspace.start({ id: instance.id, ideConfig: { name: ideName } })
navigate(Routes.toProWorkspace(host, instance.id))
}

const templateRef = instance.spec?.templateRef
const isRunning = instance.status?.lastWorkspaceStatus === "Running" // TODO: Types

Expand Down

0 comments on commit c1559ea

Please sign in to comment.