Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ef4ea0c

Browse files
committed
fmt
1 parent 8046a8b commit ef4ea0c

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

site/src/api/api.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import axios, { AxiosRequestHeaders } from "axios"
2+
import dayjs from "dayjs"
23
import * as Types from "./types"
34
import { WorkspaceBuildTransition } from "./types"
45
import * as TypesGen from "./typesGenerated"
5-
import dayjs from "dayjs"
66

77
const CONTENT_TYPE_JSON: AxiosRequestHeaders = {
88
"Content-Type": "application/json",

site/src/xServices/workspaceSchedule/workspaceScheduleBannerXService.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@
22
* @fileoverview workspaceScheduleBanner is an xstate machine backing a form,
33
* presented as an Alert/banner, for reactively updating a workspace schedule.
44
*/
5+
import dayjs from "dayjs"
56
import { createMachine } from "xstate"
67
import * as API from "../../api/api"
7-
import dayjs from "dayjs"
88
import { displayError, displaySuccess } from "../../components/GlobalSnackbar/utils"
99

1010
export const Language = {
1111
errorExtension: "Failed to extend workspace deadline.",
1212
successExtension: "Successfully extended workspace deadline.",
1313
}
1414

15-
export type WorkspaceScheduleBannerEvent = { type: "UPDATE_DEADLINE"; workspaceId: string, newDeadline: dayjs.Dayjs }
15+
export type WorkspaceScheduleBannerEvent = {
16+
type: "UPDATE_DEADLINE"
17+
workspaceId: string
18+
newDeadline: dayjs.Dayjs
19+
}
1620

1721
export const workspaceScheduleBannerMachine = createMachine(
1822
{
@@ -57,7 +61,7 @@ export const workspaceScheduleBannerMachine = createMachine(
5761

5862
services: {
5963
updateDeadline: async (_, event) => {
60-
await API.putWorkspaceExtension(event.workspaceId, event.newDeadline )
64+
await API.putWorkspaceExtension(event.workspaceId, event.newDeadline)
6165
},
6266
},
6367
},

0 commit comments

Comments
 (0)